Get your free beta license ↗
Databases · MariaDB

An import fails with an unknown collation

Last updated 30 Nov 2026
Summary

An import of a MySQL 8 dump stops with an unknown collation error for utf8mb4_0900_ai_ci. MariaDB 10.11 lacks that collation, and replacing it in the dump fixes the import.

Symptoms

The import stops with this error.

Output
ERROR 1273 (HY000) at line 1: Unknown collation: 'utf8mb4_0900_ai_ci'

Cause

utf8mb4_0900_ai_ci is the default collation in MySQL 8. A dump made on a MySQL 8 server names it in its CREATE TABLE lines.

On both AlmaLinux and Ubuntu, UrbeStack runs the distribution's MariaDB 10.11, which lacks that collation.

Resolution

  1. Replace utf8mb4_0900_ai_ci with utf8mb4_unicode_ci in the dump.

    sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' dump.sql
  2. Import the dump again as the database user.

    mariadb -u example_db -p example_db < dump.sql
  3. If the import stops on another utf8mb4_0900_ collation, replace that collation the same way.