The Internet Protocol (IP) is a protocol which defines how the data can be sent from one computer to another on the Internet. Each computer which participates on the Internet has at least one IP address that uniquely identifies it from all other computers on the Internet. The depletion of pool of the unallocated Internet Protocol Version 4 (IPv4)
So how many characters is enough to store an ip address in a mysql table? As the length of IP address varies from IPv4 to IPv6, To define the size of a column that ip address is going occupy, we must know maximum length of the ip address in both versions so that we can assign the maximum length to mysql column.