[HY000][1267] Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLIC for operation '='


在鏈接地址?connectionCollation=utf8mb4_general_ci指定下

或者下面方式

 

出現這種問題就是關聯表的字符集不匹配

1.查看數據庫的字符集

show variables where Variable_name like 'collation%';
結果:

 2.查看關聯表字符集

show create table table_name;

3.給關聯表設置字符編碼

alter table table_name default character set utf8mb4 collate=utf8mb4_general_ci;

4.給關聯表字段設置字符編碼

ALTER TABLE table_name convert to CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM