Restore MySQL DB with Unicode characters (Arabic and Kurdish) in .gz format

后端 未结 2 832
礼貌的吻别
礼貌的吻别 2020-12-10 23:43

I have a MySQL backup file in .gz format that was created by the backup wizard in cPanel. When the restoration is done by the backup wizard, contents with Arab

2条回答
  •  没有蜡笔的小新
    2020-12-11 00:12

    This is a fairly common problem caused by inconsistent encoding schemes when creating and exporting the database. Here is the simplest way to solve it:

    1. Import your backup file
    2. Export it again, but using latin1 encoding
    3. Manually edit the exported file, change all occurrences of latin1 to utf8.
    4. Import the edited file.

提交回复
热议问题