IP转数字函数inet_aton()标签:存储,1.1,IP地址,192.168,aton,MySQL,+--------------------------+,+------------------- From: https://blog.51cto.com/u_15826214/5750757
mysql> selectinet_aton('192.168.1.1');
+--------------------------+
| inet_aton('192.168.1.1') |
+--------------------------+
| 3232235777 |
+--------------------------+
1 row inset(0.00 sec)
数字转IP函数inet_ntoa()
mysql> selectinet_ntoa(3232235777);
+-----------------------+
| inet_ntoa(3232235777) |
+-----------------------+
| 192.168.1.1 |
+-----------------------+
1 row inset(0.00 sec)