title: How to retrieve IPV6 ip's from a mysql db if they are stored in INT(10) UNSIGNED
body: <p>I have a mysql db with a table where ipv4 and ipv6 ip's are stored as <code>INT(10) UNSIGNED</code> .
  To retrieve the ipv4 ip address I use function <code>INET_NTOA</code>:</p>
  
  <p><code>SELECT INET_NTOA( client_ip ) FROM mytable1;</code></p>
  
  <p>Works great for ipv4 ip's. BUT all ipv6 ip's do return as:</p>
  
  <p><code>6.0.0.0</code></p>
  
  <p>If I try to retrieve ipv4 and ipv6 ip's using function <code>INET6_NTOA ( client_ip )</code> or <code>INET6_NTOA(UNHEX( client_ip ))</code> it doesn't work, I just get output:</p>
  
  <p><code>NULL</code></p>
  
  <p><code>INET6_NTOA ( client_ip )</code></p>
  
  <p>OR:</p>
  
  <p><code>NULL</code></p>
  
  <p><code>INET6_NTOA(UNHEX( client_ip ))</code></p>
  
  <p>Is there any other way to retrieve the ipv6 ip's from my db? 
  Need to do this in bash.</p>
  
  <p>DB version: 10.2.12-MariaDB MariaDB Server</p>