Caused by: java.sql.SQLException: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_ice

问题描述:

Error querying database. Cause: java.sql.SQLException: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_icelandic_ci,IMPLICIT) for operation ‘=’ ### The error may exist in file [E:\IDEA_workspace\RuoYi-Vue-master\ruoyi-generator\target\classes\mapper\generator\GenTableMapper.xml] ### The error may involve com.ruoyi.generator.mapper.GenTableMapper.selectDbTableList-Inline ### The error occurred while setting parameters ### SQL: SELECT count(0) FROM information_schema.tables WHERE table_schema = (SELECT database()) AND table_name NOT LIKE ‘qrtz_%’ AND table_name NOT LIKE ‘gen_%’ AND table_name NOT IN (SELECT table_name FROM gen_table) ### Cause: java.sql.SQLException: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_icelandic_ci,IMPLICIT) for operation ‘=’ ; uncategorized SQLException; SQL state [HY000]; error code [1267]; Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_icelandic_ci,IMPLICIT) for operation ‘=’; nested exception is java.sql.SQLException: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_icelandic_ci,IMPLICIT) for operation ‘=’

在调试若依框架时在进行【代码生成】的导入功能时出现了该错误

在这里插入图片描述

看了许多博客说是字段的排序规则不一致导致的,但我查看了自己对应表下的各个字段,并未发现排序规则不一致的字段名

在这里插入图片描述

解决

在这里插入图片描述
重新新建数据库,但要指定排序规则:utf8_general_ci

在这里插入图片描述

在这里插入图片描述

问题解决!

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值