Loading UTF-8 encoded dump into MySQL

前端 未结 3 1708
无人及你
无人及你 2021-02-06 04:18

I\'ve been pulling my hear out over this problem for a few hours yesterday:

I\'ve a database on MySQL 4.1.22 server with encoding set to \"UTF-8 Unicode (utf8)\" (as rep

3条回答
  •  不思量自难忘°
    2021-02-06 05:21

    Did you try adding the --default-character-set=name option, like this:

    mysql --default-character-set=utf8 -h ffffd -u zzz -p dbname < dump.sql
    

    I had that problem before and it worked after using that option.

    Hope it helps!

提交回复
热议问题