Common SQL Errors

MySQL Error 91 EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR – Full Fix Guide

Galaxy Team
August 5, 2025

The error indicates an invalid collation-tailoring rule that tries to reset before a secondary ignorable character, preventing MySQL from loading or using the collation.

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 91 EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR?

MySQL Error 91: EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR surfaces when a custom collation rule resets before a secondary ignorable character, making the rule illegal. Fix it by editing or dropping the faulty collation, then reload or recreate it with valid Unicode Collation Algorithm syntax.

Error Highlights

Typical Error Message

Failed to reset before a secondary ignorable character %s. EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR was added in 8.0.16.

Error Type

Collation Error

Language

MySQL

Symbol

EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR

Error Code

91

SQL State

Explanation

Table of Contents

What is MySQL Error 91 EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR?

MySQL raises error code 91 with the message “Failed to reset before a secondary ignorable character” when it parses a collation rule that breaks Unicode Collation Algorithm (UCA) guidelines. The offending rule tries to start a reset sequence on a character whose primary weight is ignorable, which is disallowed.

The problem appears during server start, CREATE COLLATION, ALTER DATABASE … COLLATE, or any query that implicitly loads the customized collation.

MySQL 8.0.16 introduced the specific error constant EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR to clarify the failure.

What Causes This Error?

An illegal reset reference is the direct cause. UCA resets must target a character with a non-zero primary weight. When a rule references a secondary ignorable character (weight 0 at the primary level), MySQL stops parsing and throws error 91.

The error often arrives after manual edits to the ICU collation XML file or a CREATE COLLATION statement that includes a faulty TAILORING clause.

Upgrades can also surface latent issues because stricter validation began in 8.0.16.

How to Fix MySQL Error 91

Identify the failing collation with SHOW COLLATION or by reading the error log. Remove or correct the illegal rule so the reset target has a valid primary weight. Alternatively, drop the custom collation and fall back to a built-in one.

After editing, restart MySQL or run ALTER INSTANCE RELOAD DICTIONARY to reload metadata.

Always test the collation with SELECT 'x' COLLATE your_collation to confirm the server starts and queries succeed.

Common Scenarios and Solutions

Server will not start: Comment out the faulty collation in the ICU XML, start the server, then patch and re-import the collation.

CREATE COLLATION fails: Revise the TAILORING clause, ensuring every reset symbol (&) references a character with a primary weight.

Upgrade failure: Run mysqlcheck --check-upgrade after updating.

It pinpoints schemas that depend on invalid collations so you can fix them before reopening traffic.

Best Practices to Avoid This Error

Adopt built-in collations when possible, because they are fully validated. When custom rules are needed, validate them with the ICU collation tailoring tool before loading them into MySQL.

Version-control every XML tailoring file. Test upgrades in staging with sql_mode='STRICT' and log_error_verbosity=3 so collation issues surface early.

Galaxy’s fast editor makes these dry-runs quick and shareable across your team.

Related Errors and Solutions

EE_CANTOPEN_COLLATION: MySQL cannot locate the collation file. Check file paths and permissions.

EE_COLLATION_INVALID_WEIGHT: A rule assigns an impossible weight. Fix the numeric weight or remove the rule.

ER_CANT_SET_COLLATION: The specified collation is not permitted for the character set. Verify compatibility and retry.

.

Common Causes

Related Errors

FAQs

Why did this error start after upgrading MySQL?

MySQL 8.0.16 added stricter validation and the specific error code. Collations that previously loaded now fail because they violate UCA rules.

Can I ignore the error and keep using the database?

No. The server rejects the entire collation, which can block startup or any query that references it. Fix or drop the collation.

Does switching to a built-in collation solve the problem?

Yes. Built-in collations are prevalidated and cannot contain illegal resets, so the error disappears.

How does Galaxy help prevent this error?

Galaxy surfaces MySQL startup and query logs in its editor, lets teams review faulty SQL together, and share corrected CREATE COLLATION statements, reducing repeat mistakes.

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