Fuimos por un VARBINARY(16)
en su lugar y use inet_pton()
y inet_ntop()
para hacer las conversiones:
https://github.com/skion/mysql-udf-ipv6
Las funciones se pueden cargar en un servidor MySQL en ejecución y le darán INET6_NTOP
y INET6_PTON
en SQL, al igual que el familiar INET_NTOA
y INET_ATON
funciones para IPv4.
Editar:ahora hay funciones compatibles en MySQL, solo con diferente nombres . Solo use lo anterior si está en MySQL anterior a 5.6 y está buscando una ruta de actualización futura conveniente.