方法一: 通过增加参数 –default-character-set = utf8 解决乱码问题
mysql -u root -p password < path_to_import_file –default-character-set = utf8

方法二: 在命令行导入乱码解决

1. use database_name;
2. set names utf8; (或其他需要的编码)
3. source example.sql (sql文件存放路径)


详细出处参考:http://www.jb51.net/article/26167.htm

相关文章:

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