After I changed both table collition into utf8mb4_unicode_ci, the database still show this error:

Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='

when I execute this query:

select *
from zl_report_user
where union_id not in(
    select distinct unionid
    from wechat_user

should I restart the MySQL 5.7 to make it take effect? I restart the MySQL still did not work. what should I do to avoid this problem? I also tried this way:

ALTER DATABASE `zhuolian-report-fat` CHARACTER SET utf8 COLLATE utf8_unicode_ci;

still did not work.


I use this command fix the problem:

ALTER TABLE zl_report_user CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

it should always use utf8mb4 not utf8.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.