Here's what we did and still do :

Our 4.x tables and databases were/are in Latin-1 and all the 5.x tables 
are/were in utf8.  That means that the entire regiment of items (every column, 
every table, every database) in the old system (4.1) was latin-1 and all the 
destination items in 5.x were entirely utf8.

Sumary :
   We used MySQLdump to dump the files and then I use a tool to replace all 
occurrances of "latin1" to "utf8" then I use mysql command-line client to load 
/ execute those resultant dump-files.

For reference, our MY.INI files say (not sure if it is actually heeded) :

   default-character-set=latin1

Steps :

<1> Here is a single table dump line from the dump portion of my scripts : 

@mysqldump --quick --default-character-set=latin1 -uroot 
--password=secretpassword --port=3306 --skip-set-charset --skip-comments 
--add-drop-table -c -C -h databasehost -r UseThisFileForInput.sql DatabaseToUse 
--tables AddressListTables

<2>  Then we run a program to search/replace all occurrances of "latin1" to 
"utf8" (shareware program called search-replace)... but other replacement tools 
will probably work too
@sr32 /u /i /p /q /n f:\DailyBackupLogic\*.sql /slatin1 /rutf8

Your replacement methods will be different in form, but likely identical in 
function.

<3>  Then we use this line to load it into the database :

mysql --local-infile=1 -uroot --password=secretpassword --port=3310 
-DNewDatabasename -hImprovedDatabaseServer --port=3310 -b -C -e "\. 
UseThisFileForInput.sql

Tim...

-----Original Message-----
From: Matthias Henze [mailto:[EMAIL PROTECTED]
Sent: Monday, March 05, 2007 2:30 AM
To: MySQL General
Subject: migrating 4.0 to 5.0


hi,

i've still serious trouble in migrating databases createted with 4.0 to 5.0. 
the problems is still the charset. i'm connecting to mysql with php and when 
i try to use the 5.0 db german special chars are messed up. afaik 4.0 uses 
latin charset and 5.0 utf8 by default. can some one please give me a hint how 
to migrate ? i think i'm just too stupid  :-)

TIA
matthias

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to