Migrating UTF8 data from MySQL 5.0 to 4.x (with latin charset)

27 Sep

Some of old PHP application use ANSI SQL to create table and insert data. So when I use those application with UTF8 content in MySQL 5.0, the default character-set of those table is latin1. The problems come when I want to move data to an older MySQL, the encoded content goes wrong.

So this is the solution:

mysqldump -u username –opt –default-character-set=latin1 –skip-set-charset –skip-tz-utc –skip-comments –single-transaction %1 %2 %3 %4 %5

This post will be updated later with full description.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: