mysql.sys and mysql.session are reserved accounts created and managed by MySQL. If an upgrade tool flags them, inspect their state but do not invent passwords, unlock them, or edit mysql.user directly.
Last updated: November 1, 2026.
SELECT User, Host, plugin, account_locked
FROM mysql.user
WHERE User IN ('mysql.sys', 'mysql.session', 'mysql.infoschema')
ORDER BY User, Host;
SELECT VERSION() AS server_version;Run these read-only checks on the existing server and save the output with the upgrade report. The reserved accounts should remain locked and limited to their internal purpose.
Treat reserved accounts differently
MySQL’s reserved-account documentation says mysql.sys is the definer for sys schema objects and mysql.session is used internally by plugins. Both are locked against client connections. They are not application logins that need a known password.
Do not run ALTER USER against them merely to satisfy a package preflight message. Changing the authentication plugin can clear credentials and alter account metadata, while direct updates to grant tables are specifically discouraged.
Repair the upgrade path, not the account
Use MySQL Shell’s upgrade checker against the exact target version and follow the documented upgrade prerequisites. Confirm that the server binaries, package repository, and data directory belong to the same supported distribution path. Back up the instance before retrying.
mysql_native_password is disabled by default in MySQL 8.4 and removed in MySQL 9.0, but migration work should target ordinary application accounts. Inventory those accounts separately, update their connectors first, and rotate their passwords through supported ALTER USER statements during a planned migration.
If only reserved accounts are inconsistent, use the vendor-supported package or server upgrade procedure, or restore the pre-upgrade snapshot and investigate the mismatch. Preserve the error log and package versions so the operating-system vendor can distinguish a server metadata problem from an incorrect preflight rule. Do not bypass the check by unlocking internal accounts.
Continue with fixing MySQL authentication-plugin errors, backing up MySQL, and checking MySQL configuration before an upgrade.