处理Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operatio

Posted 伴老思源

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了处理Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operatio相关的知识,希望对你有一定的参考价值。

【错误详情】:DAL:DAL05Host:192.168.100.158Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation 'like'.

【排查经过】:近日重新生成并导入数据库,且根据开发人员反应导入之前还能正常访问,因此初步排除mysql程序错误,检查数据库系统配置,发现collation_database编码为utf8_unicode_ci,而数据表的编码为utf8_general_ci,两者编码方式不一致,基本锁定错误原因。

【解决方案】:将两者的编码的方式统一为utf8_general_ci,即可~


(另,注:utf8_general_ci和utf8_unicode_ci的区别,前者校对速度快,但准确度稍差;后者准确度高,但校对速度稍慢。)

以上是关于处理Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operatio的主要内容,如果未能解决你的问题,请参考以下文章

sql报错Illegal mix of collations

处理Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operatio

处理Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operatio

处理Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operatio

mysql 存储过程中报Illegal mix of collations

错误之Illegal mix of collations for operation 'like'