Miscellaneous Functions • INET6_NTOA( expr ) Given an IPv6 or IPv4 network address represented in numeric form as a binary string, returns the string representation of the address as a string in the connection character set. If the argument is not a valid address,  INET6_NTOA()  returns  NULL . INET6_NTOA()  has these properties: •It does not use operating system functions to perform conversions, thus the output string is platform independent. •The return string has a maximum length of 39 (4 x 8 + 7). Given this statement: The resulting table would have this definition: CREATE TABLE t AS SELECT INET6_NTOA( expr ) AS c1; CREATE TABLE t (c1 VARCHAR(39) CHARACTER SET utf8 DEFAULT NULL); •The return string uses lowercase letters for IPv6 addresses. mysql>  SELECT INET6_NTOA(INET6_ATON(’fdfe::5a55:caff:fefa:9089’)); -> ’fdfe::5a55:caff:fefa:9089’ mysql>  SELECT INET6_NTOA(INET6_ATON(’10.0.5.9’)); -> ’10.0.5.9’ mysql>  SELECT INET6_NTOA(UNHEX(’FDFE0000000000005A55CAFFFEFA9089’)); -> ’fdfe::5a55:caff:fefa:9089’ mysql>  SELECT INET6_NTOA(UNHEX(’0A000509’)); -> ’10.0.5.9’ If  INET6_NTOA()  is invoked from within the  mysql  client, binary strings display using hexadecimal notation, depending on the value of the  --binary-as-hex . For more information about that option, see Section 4.5.1, “mysql — The MySQL Command-Line Client” . • IS_IPV4( expr ) Returns 1 if the argument is a valid IPv4 address specified as a string, 0 otherwise. mysql>  SELECT IS_IPV4(’10.0.5.9’), IS_IPV4(’10.0.5.256’); -> 1, 0 For a given argument, if  IS_IPV4()  returns 1,  INET_ATON()  (and  INET6_ATON() ) returns non- NULL . The converse statement is not true: In some cases,  INET_ATON()  returns non- NULL  when  IS_IPV4() returns 0. As implied by the preceding remarks,  IS_IPV4()  is more strict than  INET_ATON()  about what constitutes a valid IPv4 address, so it may be useful for applications that need to perform strong checks against invalid values. Alternatively, use  INET6_ATON()  to convert IPv4 addresses to internal form and check for a  NULL  result (which indicates an invalid address).  INET6_ATON()  is equally strong as IS_IPV4()  about checking IPv4 addresses. This function takes an IPv6 address represented in numeric form as a binary string, as returned by INET6_ATON() . It returns 1 if the argument is a valid IPv4-compatible IPv6 address, 0 otherwise. IPv4- compatible addresses have the form  :: ipv4_address . • IS_IPV4_COMPAT( expr ) mysql>  SELECT IS_IPV4_COMPAT(INET6_ATON(’::10.0.5.9’)); -> 1 2446