我正在使用 Percona mysql 客户端连接到数据库,mysql Ver 8.0.15-5 for Linux on x86_64(源代码分发)
mysql> SHOW SESSION VARIABLES LIKE 'collation_connection';
Variable_name Value
collation_connection utf8mb4_general_ci
mysql> call unit_create_with_dummy_users;
ERROR 1267 (HY000): Illegal mix of collations (utf8mb4_unicode_520_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
mysql>
与 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=' 等其他错误消息不同我相信所有表格都具有相同的排序规则,但我的 collation_connection 不是?还是我理解错了?
最佳答案
- 该存储过程的
CHARACTER SET
和COLLATION
是在创建过程时建立的。请参阅显示创建过程unit_create_with_dummy_users
。 - 连接的字符集和排序规则是另一个因素。显然是不一样的。
- 表的字符集和排序规则是第三个因素。
在没有看到导致“非法混合”的实际语句内部的情况下,我们无法为您提供避免该问题的最简单方法的建议。
关于mysql - 错误 1267 (HY000) : Illegal mix of collations,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55842701/