Re: 4.1 UTF8 conversion and other problems
Posted by: Alexander Barkov
Date: May 07, 2005 07:55AM

The best way to migrate UTF8 data from 4.0 to 4.1 is:

1. using mysqldump in 4.0, run:

mysqldump dbname > db.sql

2. Add "SET NAMES utf8;" in the beginning of the dump using a text editor.

3. load into 4.1:

mysql dbname < db.sql

Or, you can not add SET NAMES statement on the step2, and run this command on step 3:

mysql --default-character-set=utf8 dbnam < db.sql

Another way to move utf8 data to 4.1 is to use ALTER TABLE.
Imagine you have a "text_col" column of TEXT type.

1. Remove wrong latin1 charset assumption:
ALTER TABLE t1 MOFIDY text_col BLOB;

2. Set correct utf8 character set:
ALTER TABLE t1 MODIFY text_col TEXT CHARACTER SET utf8;

Options: ReplyQuote


Subject
Views
Written By
Posted
3293
April 18, 2005 12:56PM
Re: 4.1 UTF8 conversion and other problems
2300
May 07, 2005 07:55AM


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.