MySQL Upgrade Table Failure After Upgrading to MySQL Server 8
By : Josh -
I upgraded to MySQL 8 (from 5.7) on my laptop and was running into an error restoring a database table with a large varchar(2048) column:
ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes
The default character set in MySQL 8 is utf8mb4, which includes this restriction.
Changing the table character set to latin1 (to match 5.7) resolved the issue.
CREATE TABLE IF NOT EXISTS... ... ENGINE=InnoDB CHARSET=latin1;