Converting latin1 to UTF-8 without downtime via replication?
Posted by: Kevin Fries
Date: June 23, 2011 12:39PM

We're trying to convert a large-ish mysql 5.0 DB from a latin1 character set to UTF-8. We've used the JDBC driver and UseOldUFT8Behavior to get utf8 data into the master's latin1 system, up until now. We want to end this.

Our first thought was to stop replication on one of our slaves, convert the data in the slave to UTF8, then rotate to master after the slave catches up, saving the downtime. It works, except that the converted slave is not reading the data from the master correctly anymore. When replication restarts, the data in the binlog is, I think, now being interpreted as UTF8 when it was encoded as latin1. That means we can't use this approach. As it takes 6 or more hours to convert our database, we really want to avoid the downtime. Can we somehow configure the replication slave to expect this latin1 encoding, but to store in UTF8 ? Has anyone tried a process like this?

Thanks,
Kevin

Options: ReplyQuote


Subject
Views
Written By
Posted
Converting latin1 to UTF-8 without downtime via replication?
6370
June 23, 2011 12:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.