Categories
MySQL

Storing IP addresses in MySQL

I have always stored IP addresses as strings in VARCHAR fields in MySQL. I am currently reading “High Performance MySQL” (O’Reilly) and it mentions the advantages of storing IP addresses as integers in an INT field rather than as a string in a VARCHAR or CHAR field. The MySQL docs specify:  “To store values generated […]