Why migrate now: EOL and CVE exposure
The official end-of-life date for MySQL 8.0 is April 30, 2026, per the Oracle Lifetime Support calendar (oracle.com/support/lifetime-support/). From that date, Oracle no longer publishes security patches for the 8.0.x branch, regardless of a CVE's severity. Servers remaining on 8.0 accumulate a security debt that grows with every quarterly Oracle CPU (Critical Patch Update) — without ever being addressed.
MySQL 8.4 is the first version designated LTS in MySQL's history. Oracle guarantees its support through April 2032 (dev.mysql.com/doc/relnotes/mysql/8.4/). Unlike the innovation branches 8.1, 8.2 and 8.3 — released between 2023 and 2024 without extended support — version 8.4 receives security patches and stability fixes over the long term. For a production database on a VPS, it is the only MySQL branch that offers a credible planning horizon.
Breaking changes to know before upgrading
—
mysql_native_passwordremoved: themysql_native_passwordauthentication plugin is permanently removed in MySQL 8.4 (it was only deprecated in 8.0). Any user account relying on this plugin will fail to connect immediately after the upgrade. PHP applications older than PHP 8.1, WordPress without PDO configured properly, and legacy JDBC clients are the most common cases. The replacement iscaching_sha2_password, the default since MySQL 8.0 but bypassed by many legacy configurations.authentication_policyparameter change: the default becomescaching_sha2_password, and anydefault_authentication_pluginline inmy.cnfis now silently ignored. If yourmy.cnfstill defines this parameter, replace it withauthentication_policy.- Removal of
innodb_file_formatand related options: theinnodb_file_formatvariable is removed. Tables created withROW_FORMAT=COMPRESSEDstill work, but any attempt to setinnodb_file_formatat runtime produces an error. Verify that your DDL scripts no longer reference this variable. - JSON type changes: MySQL 8.4 strengthens JSON/SQL conformance. Functions like
JSON_TABLE()andJSON_VALUE(), and JSON paths with malformed Unicode characters, may behave differently. Validate tables with large JSON columns in a test environment before switching to production. - Charset and collation:
utf8mb4andutf8mb4_0900_ai_ciremain the defaults, but MySQL 8.4 more strictly rejects columns declared asutf8(alias forutf8mb3). A collation migration may be required for historical databases created under MySQL 5.7. - Removed or renamed system variables: several variables present in 8.0 and marked deprecated are removed in 8.4 — notably
innodb_undo_tablespaces,slave_*(replaced byreplica_*), andquery_cache_*(the query cache was removed in 8.0). Amysqlcheckrun reports relevant warnings. - Replication: replication-related variable names have definitively switched to
source/replicaterminology. Any script or monitoring tool still callingSHOW SLAVE STATUSmust be updated toSHOW REPLICA STATUS.
Prerequisites before starting
A database engine migration in production cannot be improvised. Three conditions must be met before starting anything: a verified backup, exact knowledge of your current version, and an application compatibility check.
- Complete and verified backup: run
mysqldump --all-databases --single-transaction --routines --events > backup_pre_migration.sqland verify the file is readable (consistent size, noERRORmessage at the end of the file). An unverified backup is not a backup. - Current version and table engines: run
SELECT VERSION(); SHOW VARIABLES LIKE 'innodb_version';and list non-InnoDB tables withSELECT table_schema, table_name, engine FROM information_schema.tables WHERE engine != 'InnoDB' AND table_schema NOT IN ('information_schema','performance_schema','mysql','sys');. Any MyISAM or MEMORY table must be evaluated before the upgrade. - Application compatibility: identify the authentication plugin for each account with
SELECT user, host, plugin FROM mysql.user;. Any user onmysql_native_passwordmust be migrated tocaching_sha2_passwordbefore or during the upgrade. - Available disk space: an in-place upgrade on Debian/Ubuntu may temporarily double the space used by ibdata files. Verify at least 20% free space on the
/varpartition.
MySQL 8.0 → 8.4 LTS migration procedure on a VPS
Full backup with verification
Run
mysqldump --all-databases --single-transaction --routines --events --triggers > /root/backup_mysql80_$(date +%Y%m%d).sql. Verify the end of the file withtail -5 /root/backup_mysql80_*.sql: the last line should be-- Dump completed on …. Store this file off the VPS (S3 object storage, NFS, local copy) before proceeding.Audit accounts and authentication plugins
Run
SELECT user, host, plugin FROM mysql.user ORDER BY plugin;. For each user onmysql_native_password, executeALTER USER 'name'@'host' IDENTIFIED WITH caching_sha2_password BY 'password';. Update the connection string of each affected application (PHP DSN, Laravel.env, WordPress configuration) before the upgrade.Check deprecated variables in my.cnf
Open
/etc/mysql/mysql.conf.d/mysqld.cnf(or/etc/my.cnfdepending on your distribution) and remove or replace:default_authentication_plugin→authentication_policy = caching_sha2_password,slave_*→replica_*,innodb_undo_tablespaces,query_cache_size,query_cache_type. Any unknown variable blocks MySQL 8.4 from starting.Clean service stop and snapshot
On a Proxmox or KVM VPS, take a snapshot before touching packages: use your control panel or your hosting provider's API. Then:
systemctl stop mysqland verify the service is stopped withsystemctl status mysql.Add the MySQL 8.4 repository and update packages
On Debian 12 / Ubuntu 22.04: download the MySQL repository configuration package from
dev.mysql.com/downloads/repo/apt/(select the.debfor your distribution), install it withdpkg -i mysql-apt-config_*.deb, select MySQL 8.4 LTS in the menu, then runapt-get update && apt-get install mysql-server. The package manager replaces the 8.0 binary with the 8.4 binary and automatically upgrades MySQL system files.Upgrade system tables
On first startup of MySQL 8.4, the engine updates system tables automatically. Check the logs:
journalctl -u mysql -n 50 | grep -i 'upgrade\|error'. If the automatic upgrade did not run (rare with some distributions), run manuallymysql_upgrade --user=root --password.Post-upgrade verification
Connect and verify the version:
SELECT VERSION();should return8.4.x. Then runmysqlcheck --all-databases --auto-repair --user=root --passwordto detect any table corruption. Check the error log (/var/log/mysql/error.log) and the presence of system databases:SHOW DATABASES;should listsys,performance_schemaandinformation_schema.Application functional testing
Restart your application and check sensitive points: database connection, user authentication, queries on JSON columns, stored procedures. On a PHP application, temporarily enable error display or check application logs. An error
The server requested authentication method unknown to the clientmeans an account is still on unmigratedmysql_native_password.Cleanup and monitoring activation
Delete the local backup file once the off-VPS copy is confirmed. Check your monitoring tool (Prometheus
mysqld_exporter, Netdata, Zabbix): some metric names changed between 8.0 and 8.4, especially replication-related ones. Schedule an error log check at 24h and 72h post-migration.
MariaDB 11.x: when to prefer this alternative
MariaDB 11.x is a MySQL fork that has diverged significantly since version 10.3. There are specific cases where MariaDB 11.x is more appropriate than upgrading to MySQL 8.4, and cases where it is not.
Prefer MariaDB 11.x if your application already uses MariaDB-specific features (system-versioned tables, sequences, Spider engine, native Galera Cluster); if you need a multi-master cluster without the complexity of MySQL Group Replication; or if you operate under strict license constraints and want to remain on a fork maintained by the MariaDB Foundation (LGPL). MariaDB 11.4 LTS is the current stable branch with support through 2029, and MariaDB 11.x retains mysql_native_password by default — simplifying migration of legacy applications.
Prefer MySQL 8.4 LTS if your application was developed and tested specifically against MySQL (ORMs like Laravel Eloquent or Hibernate that use MySQL-specific features); if you use MySQL Enterprise for features like the audit plugin or commercial Thread Pool; or if your hosting provider only supports MySQL-optimized backups (Percona XtraBackup). Migrating from MySQL 8.0 to MariaDB 11.x is a cross-engine migration, riskier, and beyond the scope of this guide — it warrants a dedicated procedure with full integration testing.
Rollback possible within 24 hours: if you took a VPS snapshot before the upgrade, restoring it returns the entire server to the MySQL 8.0 state within minutes. Without a snapshot, rollback from a SQL dump is possible but slower: create a second VPS, restore the dump with mysql < backup_mysql80_*.sql, redirect the application, then decommission the old VPS. Only delete the backup and snapshot after 72 hours of stable production on MySQL 8.4.
MySQL 8.0 vs MySQL 8.4 LTS vs MariaDB 11.x
Scroll the table
| Criterion | MySQL 8.0 | MySQL 8.4 LTS | MariaDB 11.x |
|---|---|---|---|
| Security support | Ended (Apr 30, 2026) | Through April 2032 | Through 2029 (11.4 LTS) |
| mysql_native_password | Present (deprecated) | Removed | Present by default |
| Multi-master cluster | Group Replication | Group Replication | Native Galera Cluster |
| MySQL application compatibility | Native | Native | Mostly compatible, some gaps |
| License | GPL + commercial Enterprise | GPL + commercial Enterprise | LGPL (MariaDB Foundation) |
Troubleshooting: common errors after migration
—
ERROR 1045 (28000): Access deniedafter upgrade: check the account's authentication plugin withSELECT plugin FROM mysql.user WHERE user='name';. If it is stillmysql_native_password, the upgrade did not migrate this account — rerunALTER USER … IDENTIFIED WITH caching_sha2_password BY '…';.Unknown system variable 'default_authentication_plugin': this variable is no longer recognized in 8.4. Remove it frommy.cnfand replace withauthentication_policy = caching_sha2_passwordif you want to enforce this globally.- MySQL does not start after upgrade: check
/var/log/mysql/error.log. The most common error is an unknown system variable inmy.cnf. Comment out variables one by one until the source is identified, then fix it. - Degraded performance on sort queries: MySQL 8.4 applies index ordering more strictly on some queries. Run
EXPLAINon slow queries and verify that covering indexes are still used.ANALYZE TABLE table_name;forces a statistics refresh. performance_schema.replication_applier_statustable not found in monitoring scripts: someperformance_schematables were renamed or reorganized. Update monitoring queries to use the new view names documented atdev.mysql.com/doc/refman/8.4/en/performance-schema.html.
Moving to MySQL 8.4 LTS: key takeaways
Migrating from MySQL 8.0 to MySQL 8.4 LTS is an in-place upgrade achievable in under an hour on a well-prepared VPS. The two most common failure points are the removal of mysql_native_password — which breaks legacy application connections if accounts are not migrated — and removed system variables in my.cnf that prevent the service from starting. Pre-auditing these two points reduces the risk to nearly zero. For stacks that need mysql_native_password or a multi-master cluster without configuration complexity, MariaDB 11.4 LTS is a credible alternative, provided the migration is treated as a separate operation with its own integration tests.