I have a MySQL table that has a number of columns with the latin1 character set. Because of driver issues, the columns actually contain utf8 data. I want to leave the data as-is but change the column character set to UTF8.

Every solution I've examined does two alter table commands, changing the column to binary, then back to the previous type with the new character set.

There are multiple columns on multiple tables in multiple databases, so this approach would be pretty slow.

Is there a better way to get this done?

1 Answer 1


The fastest way may be just doing a mysqldump and import with specific flags set. Check this blog: http://blog.hno3.org/2010/04/22/fixing-double-encoded-utf-8-data-in-mysql/

Some other alternative methods are listed here: http://en.gentoo-wiki.com/wiki/Convert_latin1_to_UTF-8_in_MySQL

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .