Converting thousands of tables from UTF8(utf8mb3) to utf8mb4 when upgrading from 5.7 to 8.0

Hi everyone,
I am getting a warning when running prechecks for the 5.7 to 8.0 upgrade regarding tables with UTF8(utf8mb3).
Problem is there are thousands of tables with utf8mb3 that I have to convert.
Is there a utility for converting databases and tables to the newer utf8mb4?

I also find it weird that when I create a database in MySQL8.0 that UTF8 is still utf8mb3 not utf8mb4.

1 Like

utf8mb4 is the current standard in MySQL 8. “UTF8” has always been an issue in MySQL, and always been 3-bytes. Instead of changing what “UTF8” means to be 4-bytes, utf8mb4 was introduce in 5.7.

Since you are getting ‘warnings’, then there really isn’t much you need to do. The tables will still function fine. You can use pt-online-schema change to power through all the updates, or just bite the bullet and do each table one at a time using traditional ALTER TABLE.