Unknown collation MySQL Origin: Data OSI layer 6 · Presentation Last updated 14 Oct 2026

MySQL ERROR 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'

A dump from MySQL 8 uses a collation the target server (MySQL 5.7 / MariaDB) doesn’t support.

Exact message you may see Unknown collation: 'utf8mb4_0900_ai_ci'Unknown collation
Seen on: MySQL

Meaning

utf8mb4_0900_ai_ci exists only in MySQL 8. Importing into MariaDB or older MySQL fails.

Common causes

  • Dump created on MySQL 8, imported to MariaDB/MySQL 5.7
  • Hosting provider running an older MariaDB than your local MySQL 8

⚡ Quick fix

  1. Replace the collation in the dump with utf8mb4_unicode_ci
  2. Use the same server version on both ends

Detailed fix by platform

Linux

  1. sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' dump.sql

How to diagnose

  1. Versions — Source vs target server
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

1046 — MySQL ERROR 1046 (3D000): No database selected (MySQL)10461071 — MySQL ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes (MySQL)10711153 — MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes (MySQL)11531227 — MySQL ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation (MySQL)12271267 — MySQL ERROR 1267 (HY000): Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '=' (SQL)12671366 — MySQL ERROR 1366: Incorrect string value: '\xF0\x9F\x98\x80' for column (MySQL)1366declared and not used — Go: declared and not used: x / "fmt" imported and not used (Go)declared and not usednot a constructor — TypeError: x is not a constructor (JavaScript)not a constructorUnknown c…

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.