当前位置:网站首页>Legal mix of settlements (utf8mb4_0900_ai_ci, implicit) and (utf8mb4_general_ci, implicit) error resolution

Legal mix of settlements (utf8mb4_0900_ai_ci, implicit) and (utf8mb4_general_ci, implicit) error resolution

2022-06-25 21:15:00 Dawu Xiaodong

Wrote a query for all superiors sql

SELECT
    T0.*,T1.lower_count,T1.aicp,T1.user_level
FROM
    (
        SELECT
            @r AS _id,
            (
                SELECT
                    @r := invite_user
                FROM
                    fa_user
                WHERE
                    id = _id
            ) AS invite_user1,
            @l := @l + 1 AS lvl
        FROM
            (SELECT @r := ' user id', @l := 0) vars, 
            fa_user h
        WHERE
            @r <> ''
    ) T0
JOIN fa_user T1 ON T0._id = T1.id

Report errors SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=',.MySQL 8.0.20

I looked at the character set collation of the database  

Character set collation for table  

Character set collation of table fields  

resolvent : stay my.cnf The same code is also configured in

[client]
default-character-set = utf8mb4

[mysqld]
character-set-client-handshake = FALSE
character_set_server = utf8mb4
collation-server = utf8mb4_0900_ai_ci

Here's the picture  

Get into mysql perform  show variables where Variable_name like 'collation%'; see

原网站

版权声明
本文为[Dawu Xiaodong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202181331574637.html

随机推荐