-1

I thought to varchar(39) to store all kinds of ip (ipv4, ipv6), but I have pointed out that there are also the IPv4-mapped IPv6, so now I think of varchar(45). There ip longer than 45 characters? If I put varchar(45), are 100% sure that the client will not have a ip longer than 45 characters?

1 Answers1

0

How to store IPv6-compatible address in a relational database

Storing IPv6 Addresses in MySQL

Maximum length of the textual representation of an IPv6 address?

There are many similar question.

Community
  • 1
  • 1
Gaurav Pant
  • 4,029
  • 6
  • 31
  • 54