Im trying to convert my UTF8 MySQL 5.5.30 database to UTF8MB4. I have looked at this article https://mathiasbynens.be/notes/mysql-utf8mb4 but have some questions.
I
this is an old question but following some of the answers here 5 years later is, as I discovered, a bad idea.
Do not alter the size of your VARCHAR
fields, you could damage your data and break everything.
In current versions of MySQL and MaraiDB add this to your config and it will support the larger keys necessary for UTF8mb4
innodb_large_prefix=1
I also suggest adding
innodb_file_per_table =1
innodb_file_format=Barracuda
then the conversion will happen without errors/warnings about the key length