MySQL执行函数时报错:Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation 'find_in_set'

执行函数时报错:

 Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation 'find_in_set'

 

问题原因:

大意是说:collation不兼容,一个是 utf8mb4_0900_ai_ci,另一个是utf8mb4_general_ci。

解决办法:

mysql8 默认排序规则是 utf8mb4_0900_ai_ci,所以我们在设置变量的时候设置他的排序规则即可。

 

posted @ 2023-03-06 22:27  业余砖家  阅读(11358)  评论(0编辑  收藏  举报