I followed IPv6 reprenstation rules :- A series of "0"s in a 16bit block can by represented by "0".- A series of blocks containing only "0"s can be suppressed and represented by "::" (this can be done only once)

PHP's inet_ntop function is not compatible with the binary representation used by MySQL's INET6_ATON function, assuming you are using the recommended method of storing both IPv4 and IPv6 addresses in a VARBINARY(16) field. You need to convert it like this: