修改my.ini: 

default-character-set=utf8
character-set-server=utf8

 Mysql保存中文乱码问题

改完后重启mysql服务。

查看mysql编码格式:

show variables like 'character%';

可以看到编码已经都变成了utf8

Mysql保存中文乱码问题

 如果发现命令行查询中文正确,navicat查询乱码,在编辑链接中编码方式勾选为自动即可.

Mysql保存中文乱码问题

 

 参考: https://www.cnblogs.com/mufire/p/6697994.html

相关文章:

  • 2021-10-12
  • 2021-08-06
  • 2021-10-08
  • 2021-11-06
  • 2021-11-06
  • 2021-12-08
  • 2021-12-08
  • 2021-11-23
猜你喜欢
  • 2022-01-07
  • 2021-12-03
  • 2021-12-03
  • 2021-12-03
  • 2021-12-26
  • 2021-11-27
  • 2021-09-19
  • 2021-09-24
相关资源
相似解决方案