How to maintain character-set of standard-values w

2019-08-29 10:08发布

I have a MySQL4 database db4 (charset: latin1) which I want to copy to a MySQL5 database (standard charset: utf-8) db5 using the following command:

mysqldump -u dbo4 --password="..." --default-character-set="latin1" db4 | mysql -S /tmp/mysql5.sock -u dbo5 --password="..." --default-character-set="latin1" db5

The values of the entries are copied in a correct way. But the the german Umlaute (äüö...) which are contained in standard-values of some fields, are afterwards schown as "?"

What is wrong with my copy-command?

I simply want to keep everything as is was before (all data in the database stored as "latin1")

0条回答
登录 后发表回答