http://www.111cn.net/database/mysql/56096.htm

show variables like "%char%";

show variables like "%coll%";

 

然后将数据库中所有编码方式改为统一:

 

 代码如下 复制代码


mysql> set character_set_database=utf8;

Query OK, 0 rows affected (0.00 sec)

 

mysql> set collation_database= utf8_general_ci

重新查看字符集及数据表字段编码字符是否一致:


总结

utf8_bin
utf8_general_ci
utf8_unicode_ci

utf8_bin 与 utf8_general_ci 可以

utf8_bin 与 utf8_unicode_ci 可以

utf8_general_ci 与 utf8_unicode_ci 不可以

 

 

 

 

 

 

 

 

 

 

 

相关文章:

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