I wanted to know how to save an INET6_ATON result to MYSQL. So I've read the MYSQL-Help article and it says, I should use VARBINARY(16). But now, with an IPv4-Address it has the content 0x7F000001 and I'm unable to get results using SQL. My idea was to use CHAR, but in this case I don't know what's the maximum length of an INET6_ATON-result.
So: How to get MYSQL-results if the result is saved as VARBINARY?
Or otherwise: What's the maximum length of an INET6_ATON-result?
I'm converting the IP-Addresses using this SQL-Statement:
SELECT HEX(INET6_ATON("FE80:0000:0000:0000:0202:B3FF:FE1E:8329"))
Thanks a lot.