错误截图

SQL语句报错:java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_g

发生错误的原因:sql语句中有中文条件,查询的表中,表的编码不一致,导致出现这个错误

 

解决方案:

先查看所有表的结构与编码是否一致:show full columns from zx_log_manage

修改表现在的编码   ALTER TABLE `表名`convert to character set utf8mb4;  

utf8mb4:是你要设置的编码,我这里是utfmb4

 

相关文章:

  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
猜你喜欢
  • 2022-02-23
  • 2021-09-29
  • 2021-12-20
  • 2021-06-13
  • 2022-12-23
相关资源
相似解决方案