Skip to content

Database

MySQL 8.0 End of Life: Upgrade to MySQL 8.4 LTS or Switch to MariaDB

MySQL 8.0 reached end of life in April 2026. Upgrade to MySQL 8.4 LTS step by step, fix mysql_native_password logins, or migrate to MariaDB 11.8 on Ubuntu.

11 min read By the Hanoo team

MySQL 8.0, the database behind a huge share of LAMP servers, reached end of life on April 30, 2026. Oracle no longer releases fixes for it. If your WordPress, Laravel or Magento site runs on MySQL 8.0, you have two real choices: upgrade in place to MySQL 8.4 LTS, or move to MariaDB. Both are supported for years and both work with PHP apps.

This guide covers what end of life means for MySQL 8.0 on Ubuntu, what changes in MySQL 8.4, how to upgrade safely, and how to migrate to MariaDB instead.

When did MySQL 8.0 reach end of life?

MySQL 8.0 was released in April 2018. Premier support ended in April 2025, and extended support ended on April 30, 2026, with 8.0.46 as the final release. Here is where the MySQL-compatible databases stand in November 2026:

DatabaseTypeSupported until
MySQL 8.0LTSEnded April 30, 2026
MySQL 8.4LTSApril 2032 (premier support until April 2029)
MySQL 9.7LTSApril 2034
MariaDB 10.6LTSCommunity support ended July 2026
MariaDB 10.11LTSFebruary 2028
MariaDB 11.4LTSMay 2029
MariaDB 11.8LTSJune 2028
MariaDB 12.3LTSJune 2029

MySQL also publishes short-lived Innovation releases between LTS versions. They're supported only until the next one ships, so they don't suit a server you want to leave alone.

What end of life means for your server

  • Oracle's own packages: if you installed MySQL from Oracle's APT repository, you get no more updates for 8.0. Vulnerabilities found from now on stay open.
  • Ubuntu's packages: Ubuntu 22.04 and 24.04 ship mysql-server-8.0. Canonical has kept publishing backported security fixes for it after April 2026, for example in August 2026. That helps, but there are no new upstream releases behind those patches, and the backports depend on Canonical's own work.
  • Managed databases: cloud providers are moving 8.0 instances to paid extended support or scheduling forced upgrades to 8.4. Check your provider's dates.

Ubuntu 26.04 LTS ships MySQL 8.4, so even the distribution route ends up at the same upgrade.

Your options at a glance

Upgrade to MySQL 8.4 LTSSwitch to MariaDB 11.8 LTSStay on MySQL 8.0
MethodIn-place package upgradeDump and restoreNothing now
DowntimeMinutes (one restart)Minutes to hours, depending on data sizeNone
App changesRarely; mainly user authenticationRarely; see the MariaDB sectionNone
License and governanceGPLv2, OracleGPLv2, MariaDB Foundation and MariaDB plc—
Supported untilApril 2032June 2028 (11.4 LTS: May 2029)Ubuntu backports or paid support only
RollbackRestore from backupPoint the app back at the old server—

Can you jump straight to MySQL 9.7 LTS? Not directly. MySQL supports upgrades from one LTS series to the next, so 8.0 goes to 8.4 first, and 8.4 to 9.7 later if you want it. For most PHP sites, 8.4 is the sensible stop: it's supported until 2032.

Upgrade MySQL 8.0 to MySQL 8.4 LTS

What changes in MySQL 8.4

Most schemas and queries carry over unchanged. These changes are the ones that break real servers:

ChangeWhat breaksFix
mysql_native_password disabled by defaultUsers created with it can't log inMove users to caching_sha2_password, or temporarily set mysql_native_password=ON
default_authentication_plugin removedMySQL won't start if my.cnf sets itDelete the line; authentication_policy replaces it
expire_logs_days removedMySQL won't start if my.cnf sets itUse binlog_expire_logs_seconds
MASTER and SLAVE statements removedReplication scripts and monitoringCHANGE REPLICATION SOURCE TO, SHOW REPLICA STATUS, SHOW BINARY LOG STATUS
AUTO_INCREMENT on FLOAT or DOUBLE columnsThe upgrade itself failsChange those columns to an integer type first
Foreign keys to non-unique keysNew ones are rejected; existing ones load with a warningPoint foreign keys at a primary or unique key
mysqlpump removedBackup scripts that call itmysqldump or MySQL Shell's dump utilities

MySQL 8.4 also changes several InnoDB defaults for modern hardware. For example, innodb_io_capacity goes from 200 to 10000, innodb_flush_method becomes O_DIRECT, the adaptive hash index and change buffering are turned off, and the log buffer grows to 64 MB. These suit SSD-based servers, but if you tuned any of these values by hand in 8.0, review them.

1. Back up

A downgrade from 8.4 to 8.0 isn't supported. Your backup is your rollback:

Terminal
sudo mysqldump --single-transaction --routines --triggers --events \
  --all-databases > /root/mysql-8.0-full.sql

--single-transaction gives a consistent snapshot of InnoDB tables without locking your site. Copy the file off the server too, and take a provider snapshot of the disk if you can.

2. Run the upgrade checker

MySQL Shell includes a checker that reports problems before you upgrade:

Terminal
mysqlsh -- util checkForServerUpgrade root@localhost:3306 \
  --target-version=8.4.0 --config-path=/etc/mysql/my.cnf

Fix every error it reports. Read the warnings: most are about deprecated settings and the authentication plugin.

3. Find and convert users on the old authentication plugin

SQL
SELECT user, host, plugin FROM mysql.user
WHERE plugin = 'mysql_native_password';

Convert each application user:

SQL
ALTER USER 'shop'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'the-same-password';

PHP's mysqli and PDO_MySQL support caching_sha2_password through mysqlnd. It works without extra setup over a Unix socket or TLS. In WordPress, DB_HOST set to localhost uses the socket. If an old client can't be changed yet, add mysql_native_password=ON under [mysqld] as a temporary bridge. The plugin is deprecated and will be removed in a later version.

4. Clean up the configuration

Remove options that no longer exist, or MySQL 8.4 refuses to start:

Terminal
sudo grep -rnE "default_authentication_plugin|expire_logs_days|skip-host-cache|master_info_repository|relay_log_info_repository|transaction_write_set_extraction" /etc/mysql/

5. Upgrade the packages

Ubuntu 22.04 and 24.04 only have MySQL 8.0 in their own archive. To get 8.4 on them, use Oracle's MySQL APT repository. Download the current mysql-apt-config package from dev.mysql.com/downloads/repo/apt, then:

Terminal
sudo dpkg -i mysql-apt-config_*_all.deb     # choose "mysql-8.4-lts"
sudo mysql -e "SET GLOBAL innodb_fast_shutdown = 0"
sudo systemctl stop mysql
sudo apt update
sudo apt install mysql-server

innodb_fast_shutdown = 0 makes InnoDB finish all pending work before it stops, which is the recommended state for an in-place upgrade. On its first start, MySQL 8.4 upgrades the data dictionary and system tables by itself. mysql_upgrade hasn't been needed since 8.0.16.

6. Verify

Terminal
sudo mysql -e "SELECT VERSION();"
sudo journalctl -u mysql --since "10 min ago" --no-pager
sudo tail -n 50 /var/log/mysql/error.log

Then load the site, log in, and run a write action, such as saving a post or placing a test order. Watch the error log for the first day.

Switch from MySQL 8.0 to MariaDB

MariaDB began as a fork of MySQL and is still compatible with it for what PHP apps use. It's the default MySQL-compatible database in Debian and other distributions, and it is GPL-licensed and developed in the open. WordPress, Laravel, Drupal and Magento all support it. MariaDB 11.8 LTS is the long-term release Ubuntu 26.04 ships, and the one this guide uses. MariaDB 11.4 and 12.3 are also LTS releases, supported into 2029.

What's different from MySQL 8.0

  • No in-place upgrade. MariaDB can't open a MySQL 8.0 data directory. You move the data with a logical dump (mysqldump) and restore it.
  • Collations. MySQL 8.0's default collation is utf8mb4_0900_ai_ci. MariaDB 11.4.5 and later, including 11.8, accept it as an alias. Older MariaDB, such as 10.11 in Ubuntu 24.04's archive, fails with ERROR 1273 Unknown collation. Install 11.8, or replace the collation in the dump with utf8mb4_unicode_520_ci.
  • JSON. MariaDB stores JSON as text with a validity check, not in a binary format. JSON functions work, and Laravel's json columns work. MariaDB 11.8 doesn't support MySQL's -> and ->> shorthand operators in raw SQL, so use JSON_VALUE() or JSON_EXTRACT() there.
  • User accounts. Users that use MySQL's caching_sha2_password can't be carried over. Recreate application users on MariaDB. You only have a few, and it's a chance to give each app its own login.
  • Replication. MariaDB's GTIDs differ from MySQL's, so a mixed MySQL–MariaDB replication setup needs extra care. Most single-server sites don't use replication.

Migrate step by step

The cleanest route is a new server: install MariaDB there, restore, point the app at it, and keep the old server as an instant rollback. To migrate on the same server, stop MySQL and move /var/lib/mysql aside before installing MariaDB, because both use the same data directory and port.

  1. Dump only your application databases, not MySQL's own mysql system schema:
Terminal
sudo mysqldump --single-transaction --routines --triggers --events \
  --set-gtid-purged=OFF --databases shop blog > /root/apps.sql
  1. Install MariaDB 11.8 LTS. Ubuntu 24.04's archive has 10.11, so use MariaDB's official repository:
Terminal
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | \
  sudo bash -s -- --mariadb-server-version="mariadb-11.8"
sudo apt install mariadb-server
sudo mariadb -e "SELECT VERSION();"
  1. Restore and recreate users:
Terminal
sudo mariadb < /root/apps.sql
SQL
CREATE USER 'shop'@'localhost' IDENTIFIED BY 'a-long-random-password';
GRANT ALL PRIVILEGES ON shop.* TO 'shop'@'localhost';
  1. Point the app at MariaDB and test. WordPress uses the same DB_* constants in wp-config.php (see our WordPress on Ubuntu 24.04 guide). Laravel keeps DB_CONNECTION=mysql and also has a dedicated mariadb driver that you can switch to. Our guide to deploying Laravel 13 covers the rest of the server. Magento 2.4.9 needs no changes beyond the connection settings in app/etc/env.php.

  2. Check the data: compare row counts of your largest tables on both sides, and run sudo mariadb-check --all-databases.

For large databases, measured in tens of gigabytes, a parallel tool such as mydumper and myloader is much faster than mysqldump.

Which should you choose?

  • Choose MySQL 8.4 if you want the smallest change: one package upgrade, the same data directory, and the same tools. It's the right call for apps that depend on MySQL-only features, or for teams that also use MySQL in the cloud.
  • Choose MariaDB 11.8 if you're moving to a new server anyway, want a community-governed database, or want to match what distributions and many hosting platforms now ship. Typical WordPress, Laravel and Magento sites move without code changes.
  • Don't stay on 8.0 longer than it takes to plan one of the two. Ubuntu's backports reduce the risk, but they don't remove it.

If you're upgrading PHP at the same time, take it in two steps rather than one. PHP 8.2 also reaches end of life soon. See our guide to the PHP 8.2 end of life.

How Hanoo handles databases

Hanoo manages Ubuntu servers you own, and uses MariaDB for every application database:

  • MariaDB 11.8 LTS on Ubuntu 22.04, 24.04 and 26.04. On 22.04 and 24.04 it comes from MariaDB's signed repository rather than the older version in Ubuntu's archive. On 26.04 it is Ubuntu's own package.
  • One database and one user per application, with a generated password that stays out of process lists and logs. You can reveal it from the application's Access tab.
  • Remote access behind an IP allowlist. Database access from outside the server is closed until you allow specific IP addresses. That's how you load an existing dump from your own computer with the mariadb client.
  • Clones include the data. Cloning an application copies its schema and data into a fresh database, on the same server or another one. That's a safe way to try an upgrade on a copy first.

Hanoo doesn't install or manage MySQL, so if you move to MariaDB, a Hanoo server is ready for it from the first application.

Frequently asked questions

When is MySQL 8.0 end of life?

MySQL 8.0 reached end of life on April 30, 2026, with 8.0.46 as its final release. Oracle no longer publishes bug or security fixes for it.

Can I upgrade from MySQL 8.0 directly to MySQL 8.4?

Yes. Upgrading from 8.0 to the next LTS series, 8.4, is a supported in-place upgrade. Back up first, run MySQL Shell's checkForServerUpgrade, remove deprecated settings from my.cnf, then upgrade the packages. MySQL upgrades its system tables automatically on first start.

Can I upgrade from MySQL 8.0 straight to MySQL 9.7?

Not in place. MySQL supports upgrades from one LTS series to the next, so you upgrade from 8.0 to 8.4 first, then from 8.4 to 9.7. A logical dump and restore into 9.7 is the other route.

Why can't my users log in after upgrading to MySQL 8.4?

MySQL 8.4 disables the mysql_native_password plugin by default. Users created with it can't authenticate. Convert them with ALTER USER ... IDENTIFIED WITH caching_sha2_password, or set mysql_native_password=ON under [mysqld] as a temporary fix.

Is MariaDB a drop-in replacement for MySQL 8.0?

For typical PHP apps, it works without code changes. WordPress, Laravel, Drupal and Magento all support MariaDB. The move itself isn't a drop-in, though: you migrate with a dump and restore, recreate users, and use MariaDB 11.4.5 or later so MySQL 8's utf8mb4_0900_ai_ci collation is recognized.

Does Ubuntu still patch MySQL 8.0?

Ubuntu 22.04 and 24.04 ship MySQL 8.0, and Canonical has continued to publish backported security fixes for it after April 2026. There are no new upstream releases behind them. Ubuntu 26.04 LTS ships MySQL 8.4.