How to maintain character-set of standard-values when uploading MySQL-dump

谁说我不能喝 提交于 2019-12-25 07:58:16

问题


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

来源:https://stackoverflow.com/questions/11757158/how-to-maintain-character-set-of-standard-values-when-uploading-mysql-dump

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!