INET_ATON, INET_NTOA
•
INET_ATON : IP 주소를 정수로 변환해주는 함수
•
INET_NTOA : 정수를 IP 주소로 변환해주는 함수
Usage
MySQL> SELECT INET_ATON('192.168.219.103');
+------------------------------+
| INET_ATON('192.168.219.103') |
+------------------------------+
| 3232291687 |
+------------------------------+
MySQL> SELECT INET_NTOA('3232291687');
+-------------------------+
| INET_NTOA('3232291687') |
+-------------------------+
| 192.168.219.103 |
+-------------------------+
Shell
복사
참고
•
https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_inet-aton