MySQL 8.0 Is End of Life: What Breaks When You Upgrade to 8.4 (Tested With PHP 8.4)
Table of Contents
MySQL 8.0 is end of life. The 8.0 release notes put it in one line: “As of April 2026, with version 8.0.46, MySQL 8.0 reaches End of Life (EoL)”, and they send you to the 8.4 LTS series. The jump from 8.0 to 8.4 is a supported in-place upgrade, and in my test it was the quiet kind: the server converted the data directory by itself, the container came up, and the application could not log in.
That is the shape of this upgrade. Almost nothing fails during it. What fails is the first connection afterwards, a server option your docker-compose.yml has carried since 2019, and a set of InnoDB defaults that change under you without an error. This post walks through each one with the exact error I got, the query that tells you whether you are exposed, and the order I would fix them in.
What I ran
On November 27, 2026, with the official Docker images:
mysql:8.0(8.0.46) with a named volume, a database with one table, and two application users:legacy, createdWITH mysql_native_password, andmodern, created with the default plugin.- A PHP 8.4.28 CLI container with
pdo_mysql, connecting over the Docker network the way a Laravel app does (host, user, password, no TLS options). - Then I stopped the 8.0 container and started
mysql:8.4(8.4.13) on the same volume, the way you do when you change the tag in a compose file.
The server log shows the upgrade happening on its own:
[MY-011090] [Server] Data dictionary upgrading from version '80023' to '80300'.
[MY-013381] [Server] Server upgrade from '80046' to '80413' started.
[MY-013381] [Server] Server upgrade from '80046' to '80413' completed.
Twenty-one seconds, no errors, ready for connections. Then the same PHP script as before:
legacy FAIL: SQLSTATE[HY000] [1524] Plugin 'mysql_native_password' is not loaded
modern OK: 8.4.13 rows=2
The data was intact. One of the two users could no longer authenticate.
This was a lab: a small database on one machine, not a production server with replicas, real load or years of configuration. The errors and the commands are what I saw; for anything that depends on size or load, rehearse on a copy of your own data.
1. mysql_native_password is disabled, not removed
From the 8.4 “What Is New” page: “Beginning with MySQL 8.4.0, the deprecated mysql_native_password authentication plugin is no longer enabled by default.” On the upgraded server the plugin is still there, switched off:
SELECT PLUGIN_NAME, PLUGIN_STATUS FROM information_schema.PLUGINS
WHERE PLUGIN_NAME = 'mysql_native_password';
-- mysql_native_password | DISABLED
Every account that still uses it fails with error 1524, from PHP, from the mysql client and from anything else. Before you upgrade, find them on the 8.0 server:
SELECT user, host FROM mysql.user WHERE plugin = 'mysql_native_password';
If that returns rows, those accounts break on 8.4. The fix is to move them to caching_sha2_password. You need each account’s current password to do it:
ALTER USER 'app'@'%' IDENTIFIED WITH caching_sha2_password BY 'the-same-password';
You can do this on 8.0 before the upgrade, and that is the better order, because 8.0 supports both plugins.
The compose flag that turns this into a lockout
If your docker-compose.yml was written for MySQL 8.0, look for this line:
command: --default-authentication-plugin=mysql_native_password
I started a fresh 8.0 with that flag and created users the normal way. Every account came out on the old plugin, root included:
legacy % mysql_native_password
root % mysql_native_password
root localhost mysql_native_password
After upgrading that volume to 8.4 (with the flag removed, see the next section), root could not log in either, over TCP or the local socket:
ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded
And the container still looked fine. A common health check for the MySQL image is mysqladmin ping, and the mysqladmin documentation says its return status “is 0 even in case of an error such as Access denied, because this means that the server is running but refused the connection”. I checked it: with wrong credentials, mysqladmin ping printed Access denied and exited 0. A healthy container and a dead application, at the same time.
The way back in, which I ran on that volume:
- Start 8.4 once with
--mysql-native-password=ON. Root and the app user can log in again. ALTER USER ... IDENTIFIED WITH caching_sha2_password BY '...'for every account that query lists, root included.- Confirm
SELECT user, host FROM mysql.user WHERE plugin = 'mysql_native_password';is empty. - Restart without the flag.
After step 4 the PHP connection worked on plain 8.4. While the flag was on, the server log showed a deprecation warning when the old-plugin account logged in: 'mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead.
Do not keep --mysql-native-password=ON as the fix. The native authentication page says the plugin is “deprecated as of MySQL 8.0.34, disabled by default in MySQL 8.4, and removed as of MySQL 9.0.0”. It is a bridge for the hour you need to run the ALTER USER statements.
2. The server refuses to start: removed options
That same compose line does something worse on 8.4 if you leave it in. default_authentication_plugin was removed in 8.4.0 (“Use authentication_policy instead”, says the 8.4 page), and 8.4 treats removed options as fatal. With the flag in place, the container exited with code 1:
[ERROR] [MY-000067] [Server] unknown variable 'default-authentication-plugin=mysql_native_password'.
[ERROR] [MY-010119] [Server] Aborting
Delete the line rather than translating it: on 8.4 the default is already caching_sha2_password, which is what you want.
The same page lists the other server options and variables removed in 8.4, and “attempting to set any of them in MySQL 8.4 raises an error”. The ones I would grep a my.cnf, a compose file or a Helm chart for:
grep -rnE "default.authentication.plugin|skip.host.cache|--ssl\b|have_ssl|have_openssl|--old\b|--new\b|--language|skip.innodb|character.set.client.handshake|binlog_transaction_dependency_tracking|master.info.repository|relay.log.info.repository" \
docker-compose*.yml compose*.yaml /etc/mysql/ 2>/dev/null
For --skip-host-cache the replacement is --host-cache-size=0; for --ssl it is --tls-version.
3. The PHP side, once accounts are on caching_sha2_password
The worry I had going in: the caching_sha2_password page says that to connect with such an account “you must use either a secure connection or an unencrypted connection that supports password exchange using an RSA key pair”, and the server keeps an in-memory cache that only speeds up users “who have connected previously”. So I migrated the legacy account, restarted 8.4 to empty the cache, and connected again from PHP 8.4.28 with pdo_mysql and no TLS options at all:
legacy OK: 8.4.13 rows=2
modern OK: 8.4.13 rows=2
SHOW SESSION STATUS LIKE 'Ssl_version' came back empty, so that connection was not encrypted, and it authenticated anyway. I only tested PHP 8.4.28’s mysqlnd; I did not test older PHP versions or other drivers.
If your database requires TLS, Laravel’s default config/database.php already passes MYSQL_ATTR_SSL_CA from the environment to PDO, so that is one variable in .env, not a code change. Laravel 13’s database docs list MySQL 5.7+ as supported, so the framework is not what stops you.
4. The defaults that change without an error
This is the part nobody notices on upgrade day. The Changes in MySQL 8.4 page has a table of server defaults that changed from 8.0. I read the most visible ones on my lab server before and after the upgrade, with no my.cnf overrides:
| Variable | 8.0.46 (measured) | 8.4.13 (measured) |
|---|---|---|
innodb_adaptive_hash_index | ON | OFF |
innodb_change_buffering | all | none |
innodb_io_capacity | 200 | 10000 |
innodb_flush_method | fsync | O_DIRECT |
innodb_log_buffer_size | 16 MiB | 64 MiB |
The documented list is longer: buffer pool instances, page cleaners, purge and read threads, innodb_use_fdatasync, the temptable settings, and two Group Replication defaults. MySQL’s own advice on that page is to “evaluate all the new defaults and use as many as you can”.
I did not benchmark the difference, so I won’t tell you it is faster or slower for you. What I can tell you is where it matters: if you tuned 8.0 by setting nothing and measuring, your measurements were against the old defaults. If a query you care about leaned on the adaptive hash index, or your disk behaves differently with O_DIRECT, pin the old value in my.cnf for the upgrade and remove it later on purpose. One change at a time is easier to blame.
5. Run the upgrade checker first
The upgrade paths page lists 8.0 to 8.4 as an in-place upgrade and recommends running MySQL Shell’s upgrade checker before you do it. The mysql:8.4 image ships mysqlsh, so you don’t need to install anything; point it at the 8.0 server:
docker run --rm --network <your-network> mysql:8.4 \
mysqlsh --uri root:<password>@<old-host>:3306 -- util check-for-server-upgrade --target-version=8.4
Against the 8.0 server started with the old compose flag, it found exactly the two problems above. The error:
Error: default_authentication_plugin - mysql_native_password authentication
method was removed and it must be corrected before upgrading to 8.4.0
release.
A warning listing legacy@%, root@% and root@localhost as mysql_native_password users, the full list of defaults that will change, and a notice that the SET_USER_ID privilege would be removed from both root accounts. The summary line: Errors: 1 Warnings: 23 Notices: 2.
One detail: the image I pulled ships MySQL Shell 8.4.10 next to server 8.4.13. When I asked for --target-version=8.4.13, the shell answered that upgrading “from version 8.0.46 to 8.4.13 is not supported” and suggested targetVersion=8.4. That message is about the shell being older than the target, not about your upgrade. Use 8.4.
6. The rest of the incompatibility list
From the 8.4 incompatible changes and removed features, the items that reach application and ops code:
- Spatial indexes. “When upgrading to MySQL 8.4.4 or later, it is recommended that you drop any spatial indexes beforehand, then re-create them after the upgrade is complete.” To find them:
SELECT TABLE_SCHEMA, TABLE_NAME, INDEX_NAME FROM information_schema.STATISTICS WHERE INDEX_TYPE = 'SPATIAL'; - Replication statements with the old names are gone, and they now cause a syntax error:
SHOW SLAVE STATUS(useSHOW REPLICA STATUS),START SLAVE,STOP SLAVE,CHANGE MASTER TO,RESET MASTER,SHOW MASTER STATUS(useSHOW BINARY LOG STATUS). These live in monitoring scripts and backup tools more than in applications. FLUSH HOSTSwas removed. UseTRUNCATE TABLE performance_schema.host_cacheormysqladmin flush-hosts.WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS()was removed; useWAIT_FOR_EXECUTED_GTID_SET().
grep -rnE "SHOW SLAVE STATUS|START SLAVE|STOP SLAVE|CHANGE MASTER TO|RESET MASTER|SHOW MASTER STATUS|FLUSH HOSTS|WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS" .
7. If you use Laravel Sail, you may already be mid-upgrade
On November 25, 2025, Laravel Sail changed its MySQL service from mysql/mysql-server:8.0 to mysql:8.4 (laravel/sail#834, “Replace mysql/mysql-server:8.0 with mysql:8.4”). The stub today is image: 'mysql:8.4' with a volume named sail-mysql.
If you regenerate the compose file on an older project (sail:install, sail:add, or copying the service from a new app), the next sail up starts 8.4 on your existing 8.0 volume: the upgrade in my lab, on your laptop. Sail’s own health check is mysqladmin ping, which, as above, passes even when the login fails. Neither the old stub nor the new one passes an authentication flag (extra options only arrive through MYSQL_EXTRA_OPTIONS), so a stock Sail volume should have its accounts on 8.0’s default plugin; a volume from a hand-written compose file with --default-authentication-plugin=mysql_native_password is the one that locks you out. Run the query from section 1 before you find out.
What is not 8.4, but you will meet it the same week
If your PHP image installs the MySQL client tools with apt-get install default-mysql-client, check which client you got. On the Debian 13 base of php:8.4.28-cli that is the MariaDB client (mysqldump from 11.8.9-MariaDB). Pointed at my 8.4 server, it failed before authenticating:
mysqldump: Got error: 2026: "TLS/SSL error: self-signed certificate in certificate chain" when trying to connect
I ran the same thing against a fresh 8.0.46 and got the same error, so this is not an 8.4 change: the MySQL images generate a self-signed certificate, and this client verifies it by default. It shows up during an upgrade because that is when you rebuild images and run mysqldump for the backup. With --skip-ssl it connected. If it hits you through Laravel’s php artisan schema:dump, which shells out to mysqldump: Laravel’s MySqlSchemaState passes --ssl-ca when you configure MYSQL_ATTR_SSL_CA, and adds --ssl=off for a MariaDB client when the connection’s ATTR_SSL_VERIFY_SERVER_CERT option is false. I read that code; I did not run schema:dump in this lab.
The order I would follow
- On the 8.0 server:
SELECT user, host FROM mysql.user WHERE plugin = 'mysql_native_password';and move every account it lists tocaching_sha2_password, root included. - Delete
--default-authentication-pluginand the other removed options from compose files,my.cnfand charts. - Run
util check-for-server-upgrade --target-version=8.4from the 8.4 image until it reports zero errors. - Take a backup you have restored at least once.
- Rehearse on a copy: start 8.4 on a copy of the data directory, run your test suite and your health checks with real credentials (not
mysqladmin ping). - Decide about the InnoDB defaults: keep the new ones, or pin the old ones and change them later, one at a time.
- Upgrade, and make the first check an application login, not the container status.
If you are planning the PHP side of the same server at the same time, PHP 8.2 loses security fixes on December 31, 2026 and what breaks when you upgrade to Laravel 13 cover it. If the database is PostgreSQL instead, the equivalent post is PostgreSQL 14 end of life for a Laravel app.
Frequently asked questions
When did MySQL 8.0 reach end of life?
The MySQL 8.0 release notes say that as of April 2026, with version 8.0.46, MySQL 8.0 reaches end of life, and they encourage 8.0 users to upgrade to the latest MySQL 8.4 LTS or an Innovation release. MySQL 8.0.46 is dated April 21, 2026.
Can I upgrade MySQL 8.0 directly to 8.4?
Yes. The MySQL 8.4 upgrade paths page lists going from an 8.0 release to 8.4 LTS as supported with an in-place upgrade, a logical dump and load, or replication. It recommends running MySQL Shell’s upgrade checker first. In a test on November 27, 2026, starting mysql:8.4 (8.4.13) on an 8.0.46 data directory upgraded it automatically in about 21 seconds.
How do I fix "Plugin mysql_native_password is not loaded" after upgrading to MySQL 8.4?
The account still uses mysql_native_password, which 8.4 disables by default. Move it to caching_sha2_password with ALTER USER user@host IDENTIFIED WITH caching_sha2_password BY password. If you cannot log in at all, start the server once with --mysql-native-password=ON, run the ALTER USER statements, and restart without the flag. The plugin is removed in MySQL 9.0.0, so the flag is only a bridge.
Why does MySQL 8.4 fail with "unknown variable default-authentication-plugin"?
The default_authentication_plugin variable was deprecated in MySQL 8.0.27 and removed in 8.4.0, and 8.4 raises an error when a removed option is set, so the server aborts at startup. Delete the --default-authentication-plugin line from docker-compose.yml or my.cnf; the 8.4 default is already caching_sha2_password. The replacement variable is authentication_policy.
Does Laravel support MySQL 8.4?
Yes. The Laravel 13 database documentation lists MySQL 5.7 and newer as supported, and Laravel Sail has used the mysql:8.4 image since November 25, 2025. What breaks is at the server and account level (the authentication plugin and removed options), not in Laravel itself.
Which MySQL defaults change between 8.0 and 8.4?
Mostly InnoDB settings. Among others, innodb_adaptive_hash_index goes from ON to OFF, innodb_change_buffering from all to none, innodb_io_capacity from 200 to 10000, innodb_flush_method from fsync to O_DIRECT on Linux where supported, and innodb_log_buffer_size from 16 MiB to 64 MiB. The full table is in the Changes in MySQL 8.4 page of the reference manual.
Why is my MySQL container healthy if the app cannot connect?
If the health check is mysqladmin ping, it reports success when the server is running even if the login is rejected: the MySQL documentation says its return status is 0 even for an error such as Access denied. Use a health check that logs in with the application credentials and runs a query.
Sources
- MySQL: MySQL 8.0 Release Notes (end-of-life notice and 8.0.46 release date).
- MySQL 8.4 Reference Manual: What Is New in MySQL 8.4 since MySQL 8.0, Changes in MySQL 8.4, Upgrade Paths, Native Pluggable Authentication and mysqladmin.
- Laravel: Database documentation (13.x), laravel/sail#834 and
MySqlSchemaState.php. - My own lab, run on November 27, 2026 with
mysql:8.0(8.0.46),mysql:8.4(8.4.13, MySQL Shell 8.4.10) andphp:8.4.28-cliwithpdo_mysql.
Found it useful? Get the next one by email
Once a week: what breaks when you upgrade, AI for developers and what I'm building, with sources. No spam.
By subscribing you accept our privacy policy.