I have a rather large database that I am trying to convert from charset and collation latin1/latin1_swedish_ci
to utf8mb4/utf8mb4_unicode_ci
. I am hoping to setup replication to a slave, run the conversion, and then promote the slave when finished as to avoid downtime.
I noticed that when running the query...
ALTER TABLE `sometable` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
...MySQL automatically converts text
to mediumtext
or mediumtext
to longtext
, etc.
Is there a way to turn this feature off? It is nice that MySQL has this feature, but the problem is that it breaks replication because the structure of the tables on the slave is different from master.