MySQL 8.0 reached end of life: how to upgrade to 8.4 LTS safely
Oracle ended support for MySQL 8.0 in April 2026, so it no longer gets security fixes. 8.4 is the current long-term support release and 8.0 upgrades to it in place. The upgrade checker finds problems before you start.
Check the version and what uses the server
Applications connect with a user and an authentication plugin, which matters below.
mysql --version mysql -e "SELECT user, host, plugin FROM mysql.user"Run the upgrade checker
MySQL Shell reports removed features, reserved words and settings that will not work on the new version.
mysqlsh -- util checkForServerUpgrade root@localhost --target-version=8.4.0Back up
A logical backup that includes routines and events, and a copy of the configuration.
mysqldump --all-databases --routines --events --single-transaction > ~/mysql-all-$(date +%F).sql sudo cp -a /etc/mysql ~/mysql-etc-backupUpgrade the packages
Use the MySQL APT repository to move to the 8.4 series; the server upgrades its data dictionary when it first starts. No separate upgrade command is needed.
sudo apt-get update && sudo apt-get install mysql-server sudo systemctl status mysql --no-pager | head -n 5 mysql --versionFix the authentication plugin
In 8.4 the mysql_native_password plugin is disabled by default, so older applications that use it cannot connect. Move those users to caching_sha2_password, or re-enable the plugin temporarily while you update the application.
mysql -e "ALTER USER 'app'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'NEW_PASSWORD'" # temporary: add mysql_native_password=ON under [mysqld] in the MySQL configuration
Common mistakes
- Skipping the checker and finding a removed setting in the server log after the restart.
- Old PHP drivers (mysqlnd before 7.4) that cannot use caching_sha2_password.
- Replication: upgrade replicas before the source.
How to undo it
A major upgrade cannot be undone in place: restore the backup into a fresh 8.0 install. This is why you back up first.
Sources
Commands are for Debian and Ubuntu unless noted. Test on a copy first and keep a backup: you are responsible for changes on your own systems.