Technical Error: 1273 Unknown collation: 'utf8mb4_0900_ai_ci' Print

  • 0

Problem Description

When importing a database from a server running MySQL 8+ you might see this error: 

Technical Error: 1273 Unknown collation: 'utf8mb4_0900_ai_ci'

Problem Resolution

As per this StackExchange discussion:

When MySQL introduced utf8mb4_0900_ai_ci based on comparison and sorting rules in Unicode 9.0, MariaDB chose not to follow at the time. The new rules did not change much as Unicode's sorting and comparison rules have been pretty stable for several generations of Unicode now. Choosing the "unicode_520_ci" rules will in almost all situations have the same result and this collation can be used in both MySQL and MariaDB.

To resolve this issue, you will need to open your database export file and edit it with a text editor, replacing each occurrence of utf8mb4_0900_ai_ci with utf8mb4_unicode_520_ci

Then you will be able to import the database without this problem.


Was this answer helpful?

← Back