Syntax
INET6_NTOA(expr)
Purpose
You can call this function to convert a numeric IPv6 or IPv4 address to a binary string, which can be used in the connection character set. It returns NULL if the argument is not a valid address.
The INET6_NTOA() function has the following characteristics:
The returned string is unrelated to the platform because this function does not use system functions for conversion.
The maximum length of the returned string is 39, including eight quartets and seven columns.
The returned string uses lowercase letters to represent an IPv6 address.
Examples
obclient> SELECT INET6_NTOA(INET6_ATON('fdfe::5a55:caff:fefa:9089'));
+------------------------------------------------------------+
| INET6_NTOA(INET6_ATON('fdfe::5a55:caff:fefa:9089')) |
+------------------------------------------------------------+
| fdfe::5a55:caff:fefa:9089 |
+------------------------------------------------------------+
1 row in set