MySQL VARCHAR Lengths and UTF-8

This answer showed up at the top of my google search results but wasn’t correct. The confusion is probably due to different versions of MySQL being tested. Version 4 counts bytes Version 5 counts characters Here is the quote from the official MySQL 5 documentation: MySQL interprets length specifications in character column definitions in character … Read more

Equivalent of varchar(max) in MySQL?

The max length of a varchar is subject to the max row size in MySQL, which is 64KB (not counting BLOBs): VARCHAR(65535) However, note that the limit is lower if you use a multi-byte character set: VARCHAR(21844) CHARACTER SET utf8 Here are some examples: The maximum row size is 65535, but a varchar also includes … Read more