I'm trying to create a table in MySQL with the statement:
CREATE TABLE tags (Tag VARCHAR(200) NOT NULL default '', Login VARCHAR(255) NOT NULL default '', PRIMARY KEY (Tag, Login)) ENGINE=MyISAM;
However I'm getting an error:
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
If I reduce the Tag field to VARCHAR(78) the table is created, however VARCHAR(79) fails. Why is any varchar size above 78 failing? I've read a few posts around the web about MySQL storing VARCHAR as UTF-8 which can take up to six bytes, but 79 * 6 is 474 which is well within the 1000 byte limit so not sure they UTF-8 thing is accurate.