https://www.cnblogs.com/coderdxj/p/8602243.html

************************************************************

ERROR:
Unknown command '\­'.
ERROR:
Unknown command '\f'.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '??g?&
{=?6?J^E?       \?\f??Abw:??Q???(?<' at line 1

由于编码不一致导致的

虽然大部分导出是没有问题的 但是数据表中存储包含一些脚本(富文本内容)会出现该问题,强制指定编码即可解决。

mysql导入时指定编码:

mysql -u root -p --default-character-set=utf8
或者在导出时后显式指定编码就不存在这个问题了:

mysqldump -uroot -p --default-character-set=utf8 mydb > E://xxxx.sql
 $mysqldump --default-character-set=utf8mb4 -uusername -p database > dump.sql

相关文章:

  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2021-12-18
  • 2021-05-22
  • 2021-04-07
  • 2022-12-23
猜你喜欢
  • 2021-09-29
  • 2021-10-01
  • 2022-12-23
  • 2021-09-08
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案