The mysql.user table contains an outdated column size (77 instead of 93 characters), requiring mysql_upgrade or manual ALTER TABLE to match the current server version.
MySQL Error 3189 ER_USER_COLUMN_OLD_LENGTH means the mysql.user system table still uses an older 77-character column after an upgrade. Run mysql_upgrade or manually ALTER the column to 93 characters to fix the mismatch and restart MySQL.
ER_USER_COLUMN_OLD_LENGTH
MySQL error 3189 appears when the server checks the mysql.user system table and finds that a specific VARCHAR column is only 77 characters long, while the current version expects 93 characters.
The check was introduced in MySQL 5.7.13 to enforce longer host, user, or authentication_string columns needed for new authentication plugins. Running a newer mysqld with an old table triggers the error during startup or when accessing user data.
The primary trigger is an in-place binary upgrade where the data dictionary was not upgraded with mysql_upgrade. The table definition remains on the older layout, creating a length mismatch.
Restoring a logical dump created from an earlier MySQL version into a newer server without using --upgrade causes the same schema drift. Replication from an old master to a new replica can also propagate the outdated structure.
Running mysql_upgrade immediately updates all system tables, including mysql.user, to the expected format. The tool issues ALTER TABLE statements and rebuilds indexes safely.
If mysql_upgrade is unavailable, manually adjust the column: stop the server, start in --skip-grant-tables mode, ALTER the column to VARCHAR(93), then restart normally.
-- start server with skip-grant-tables, then connect
ALTER TABLE mysql.user MODIFY user VARCHAR(93) NOT NULL;
FLUSH PRIVILEGES;
1. Post-package upgrade on Linux: Package managers replace binaries but skip mysql_upgrade. Run sudo mysql_upgrade and restart mysqld.
2. Replica build failure: A new replica refuses to start. Before replication, run mysql_upgrade on the replicated data directory or rebuild from a fresh backup taken after an upgrade.
Always execute mysql_upgrade (or the built-in --upgrade=auto flag in MySQL 8.0+) immediately after any version change. Automate it in orchestration scripts.
Maintain separate logical backups per major version to prevent accidental restores of outdated schemas. Use Galaxy Collections to store upgrade queries so teams run the endorsed script consistently.
HY000 ER_PLUGIN_IS_NOT_LOADED occurs when an authentication plugin referenced in mysql.user is unavailable. Running mysql_upgrade often resolves both issues.
HY000 ER_PROFTARGET_HAS_FLUSHED is another system table mismatch after upgrades. The fix pattern is identical: run mysql_upgrade or ALTER the table manually.
Binaries were updated but mysql_upgrade was skipped, leaving mysql.user unchanged.
An old mysqldump import creates a 77-character column on a new server.
The replica inherits outdated DDL via row-based replication.
Direct ALTERs or file copies reverted the column length.
Math function argument out of range, unrelated to schema size but shares HY000 state.
Authentication plugin missing after upgrade, often fixed by mysql_upgrade.
User table still uses Password field; upgrade converts it to authentication_string.
mysql_upgrade requires write access to system tables and may lock them briefly. Plan a short maintenance window or run during low traffic.
No. MySQL refuses certain privilege operations, and replication setup can fail. Upgrade the schema promptly.
MySQL 8.0 integrates upgrade logic into the server with --upgrade=auto, but manual runs remain safe.
Galaxy lets teams store upgrade scripts in shared Collections, ensuring every environment runs the endorsed mysql_upgrade steps after deployment.