• inet_aton:将ip地址转换成数字型
  • inet_ntoa:将数字型转换成ip地址
//使用inet_aton函数,将字符串IP转换为整型;
mysql> select inet_aton('73.115.134.73') as ip;
+------------+
| ip         |
+------------+
| 1232307785 |
+------------+

//使用inet_ntoa函数,将整型IP转换为字符串;
mysql> select inet_ntoa(1232307785) as ip;
+---------------+
| ip            |
+---------------+
| 73.115.134.73 |
+---------------+

 

相关文章:

  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2021-06-24
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
相关资源
相似解决方案