在开发过程中,调用存储过程是出现了下面的问题:
Cause: java.sql.SQLException: Illegal mix of collations(utf8mb4_general_ci,IMPLICIT)and(utf8mb4_0900_ai_ci,IMPLICIT)for operation'='ERROR:JtinyMsgThread-***Handle Event Exception: msgId=31000 infoorg.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1267];
The error occurred in com/lock/paymanager/model/Billrecord.xml.
The error occurred while applying a parameter map.
Check the swapParameters.
Check the statement (update procedure failed).
Cause: java.sql.SQLException: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '='; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
The error occurred in com/lock/paymanager/model/Billrecord.xml.
The error occurred while applying a parameter map.
Check the swapParameters.
Check the statement (update procedure failed).
Cause: java.sql.SQLException: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '='
Illegal mix of collations 非法混合排序规则(即非法混合了不同的字符集)
首先,查看当前数据库的默认编码:
show variables where Variable_name like 'collation%';

查看库的字符编码:
版权声明:本文为weixin_40750633原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。