Common SQL Errors

MySQL Error 28 EE_UNKNOWN_COLLATION: Collation not compiled – Fix & Prevent

Galaxy Team
August 5, 2025

MySQL raises EE_UNKNOWN_COLLATION when a query references a collation that is neither compiled into the server nor listed in the configured character-sets directory.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 28 EE_UNKNOWN_COLLATION?

MySQL Error 28 EE_UNKNOWN_COLLATION appears when a query, table, or server setting refers to an unknown collation. Replace or install the missing collation or upgrade to a server build that supports it to resolve the issue.

Error Highlights

Typical Error Message

Collation '%s' is not a compiled collation and is not specified in the '%s' file

Error Type

Configuration Error

Language

MySQL

Symbol

EE_UNKNOWN_COLLATION

Error Code

28

SQL State

Explanation

Table of Contents

What is MySQL error 28 EE_UNKNOWN_COLLATION?

The exact message is: Collation '%s' is not a compiled collation and is not specified in the '%s' file. MySQL throws this global error at parse time when it encounters an unrecognized collation identifier.

The server expects the requested collation to be either compiled into the binary or declared in the Index.xml inside its share/charsets directory.

If neither is true, the lookup fails and error 28 is returned.

When does the EE_UNKNOWN_COLLATION error occur?

The error surfaces during CREATE TABLE, ALTER TABLE, SET NAMES, or connection negotiation whenever a non-existent collation name or ID is sent to the server.

It also appears after restoring dumps created on a newer MySQL version with collations unknown to the target server.

Why is it important to fix this error quickly?

Queries that reference an invalid collation cannot execute, blocking schema migrations, data imports, and even new client connections. Production outages may follow if applications rely on those operations. Addressing the root cause prevents cascading failures and data corruption.

.

Common Causes

Invalid collation name in SQL

Typos such as utf8m4_unicode_ci instead of utf8mb4_unicode_ci are the most frequent trigger.

Dump restored to older MySQL version

A dump taken from MySQL 8.0 that uses utf8mb4_0900_ai_ci will fail on a 5.7 server that lacks that collation.

Custom character set directory missing

When --character-sets-dir points to an empty or incorrect path, MySQL cannot load external collation files.

Mismatched client and server settings

A client driver may request an unsupported collation during the handshake, triggering the error before a query is sent.

.

Related Errors

FAQs

Is EE_UNKNOWN_COLLATION a client or server error?

It originates inside the MySQL server, but client drivers can trigger it during handshake by asking for an unsupported collation.

Can I ignore the error and force a default collation?

No. MySQL rejects the entire statement. You must supply a valid collation or alter the server's charsets directory.

Does upgrading MySQL always solve the problem?

Upgrading usually helps if the collation exists in newer builds. Verify with SHOW COLLATION before migrating.

How does Galaxy assist with this error?

Galaxy's schema-aware autocomplete lists only valid collations for your connected server, reducing typos and mismatched versions.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo