MySQL Forums
Forum List  »  Backup

Cant import database correctly, collation mismatch
Posted by: Cain Nuke
Date: May 24, 2012 06:34AM

Hi,

i have a daatbase running on Windows and works fine but im trying to import it into Centos linux 5.8 but i cant. After importing the database i get "illegal mix of collation" error and i dont know why. This is what i did to export from windows:

mysqldump -u USER -pPASSWORD DATABASE > data.sql

and this is the command i use to import into linux:

mysql -u USER -pPASSWORD < data.sql

i first tried by creating an empty database and then importing the sql into it but since it didnt work like that then i tried importing the full database so its get created while as it imports. The result is the same collation error. What am i doing wrong?

I went to webmin on Centos and i found out mysql variables are set to the following:

character_set_client latin1

character_set_connection latin1

character_set_results latin1

collation_connection latin1_swedish_ci


my database uses utf8 so i guess i should change those variables to utf8 as well but i really dont know where and how. Could you please point me in the right direction?

Thank you.

Thank you.

Options: ReplyQuote


Subject
Views
Written By
Posted
Cant import database correctly, collation mismatch
3809
May 24, 2012 06:34AM


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.