MySQL ERROR 1267 (HY000): Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '='
Two strings with different collations were compared or joined.
Seen on:
SQL
Meaning
Tables created at different times (or by different MySQL versions) have different default collations; joins on text columns then fail.
Common causes
- Tables/columns with different collations
- Connection collation differs from column collation
- Mixing utf8 and utf8mb4
⚡ Quick fix
- Convert tables to one collation
- COLLATE explicitly in the query as a stopgap
Detailed fix by platform
SQL
ALTER TABLE customers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
How to diagnose
- Columns — SHOW FULL COLUMNS collations?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026