Illegal mix of collations (utf8_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation
Posted wangyulu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Illegal mix of collations (utf8_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation 相关的知识,希望对你有一定的参考价值。
Error:Illegal mix of collations (utf8_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation ‘=‘
Errno:1267
问题很明显,就是mysql字符编码问题,所以主要排查问题方向应该往设置编码及用到编码的地方
这里是Mysql设置编码的常用命令,一般在链接数据时会用到:
SET CHARACTER_SET_CLIENT = utf8,
CHARACTER_SET_CONNECTION = utf8,
CHARACTER_SET_DATABASE = utf8,
CHARACTER_SET_RESULTS = utf8,
CHARACTER_SET_SERVER = utf8,
COLLATION_CONNECTION = utf8_general_ci,
COLLATION_DATABASE = utf8_general_ci,
COLLATION_SERVER = utf8_general_ci,
以上是关于Illegal mix of collations (utf8_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation 的主要内容,如果未能解决你的问题,请参考以下文章
mysql 存储过程中报Illegal mix of collations
错误之Illegal mix of collations for operation 'like'
执行mysql语句报错 Illegal mix of collations……
MySQL Error: Illegal mix of collations for operation 'concat'
MySQL SQL error: #1271 - Illegal mix of collations for operation 'UNION'
mysql5.6修改字符编码,ERR:Illegal mix of collations for operation 'concat'