List:General Discussion« Previous MessageNext Message »
From:Timothy Little Date:March 5 2007 3:37pm
Subject:RE: migrating 4.0 to 5.0
View as plain text  
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

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

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


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


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


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  :-)


MySQL General Mailing List
For list archives:
To unsubscribe:

migrating 4.0 to 5.0Matthias Henze5 Mar
  • Re: migrating 4.0 to 5.0Mario Guenterberg5 Mar
  • Re: migrating 4.0 to 5.0Martijn Tonies5 Mar
    • Re: migrating 4.0 to 5.0Matthias Henze5 Mar
  • Re: migrating 4.0 to 5.0Martijn Tonies5 Mar
RE: migrating 4.0 to 5.0Timothy Little9 Mar