How to Upgrade from MySQL 8.0 to 8.4 LTS?

https://dev.mysql.com/doc/refman/8.4/en/images/mysql-lts-innovation-versioning-graph.png
Upgrading from MySQL 8.0 to 8.4 LTS gives teams a stronger foundation for daily database management. Many users worry about keeping their data safe and ensuring a smooth transition. Planning carefully helps avoid problems and keeps systems reliable.
Teams see better security and improved performance after the upgrade.
Usability becomes easier, which saves time and effort.
Choosing the right platform and following best practices during the MySQL Update provides long-term stability.
Before starting a MySQL Update, teams should check if their current version supports a direct upgrade to MySQL 8.4 LTS. The official upgrade path allows users to move from an LTS or Bugfix series to the next LTS series. The table below shows the recommended upgrade paths and supported methods:
Upgrade Path | Path Examples | Supported Upgrade Methods |
---|---|---|
From an LTS or Bugfix series to the next LTS | 8.0.37 to 8.4.x LTS | In-place upgrade, logical dump and load, replication |
The following table lists which source versions support a direct upgrade to MySQL 8.4 LTS:
Source Version | Directly Supported Upgrade |
---|---|
MySQL 8.0 | MySQL 8.4 |
MySQL 5.7 | MySQL 8.0 (intermediate) |
Direct upgrades from MySQL 8.0 to 8.4 are supported.
If the current version is lower than 8.0.22, an intermediate upgrade is necessary.
Multi-version upgrades are not supported. Teams cannot skip versions.
Administrators should review key compatibility changes before starting the upgrade. These changes can affect authentication, replication, and table creation. Important updates include:
The mysql_native_password
plugin is now disabled by default. The new default is caching_sha2_password
.
GTID now supports GTID TAGS, which improves transaction identification.
The terminology of MASTER/SLAVE has been removed. This change affects commands and status variables.
Using AUTO_INCREMENT
with FLOAT
or DOUBLE
is no longer allowed. MySQL will return errors if teams try to create tables with this combination.
Automatic updates to histograms are now enabled with the AUTO UPDATE
option during ANALYZE TABLE
statements.
New privileges exist for the FLUSH PRIVILEGES
statement and OPTIMIZE LOCAL TABLE
.
Several InnoDB variables have new default values.
The mysqldump
tool now supports the --output-as-version
option for logical backups from previous versions.
Shutdown and startup messages have improved.
The FLUSH HOSTS
statement has been removed. Teams must use TRUNCATE TABLE performance_schema.host_cache
instead.
Tip: Review the full list of changes in the official documentation before starting a MySQL Update. This step helps prevent unexpected issues during the process.
Image Source: unsplash
Before starting a MySQL Update, administrators should complete several important checks to ensure a smooth process:
Confirm Version: Run SELECT VERSION();
to check the current MySQL version. The version must be at least 8.0.21 to proceed directly to 8.4 LTS.
Review Changes: Examine the release notes for MySQL 8.4. Look for removed settings, new reserved words, and other changes that could affect applications.
Backup & Precheck: Make a full backup of the database. Test the restore process to confirm data safety.
Run Upgrade Checker: Use the MySQL Shell Upgrade Checker Utility (util.checkForServerUpgrade()
) to identify potential issues that might block the MySQL Update.
Note: Teams should also review supported platforms and GCC version requirements. Some operating systems or compiler versions may not support MySQL 8.4 LTS.
Several tools help verify system compatibility before a MySQL Update:
pt-upgrade: Tests application queries for compatibility issues.
MySQL Shell Upgrade Checker Utility: Generates a report with warnings, errors, and notices to prepare for the upgrade.
Backing up data is a critical step in any MySQL Update. Teams should understand the different backup types and follow best practices to protect their data:
Full, Incremental, and Differential backups each serve different purposes. A full backup must exist and be tested before the upgrade.
Regularly test backups to confirm their integrity.
Store backups offsite, such as in the cloud or on an external file server, to guard against data loss from hardware failures or disasters.
Keep 1-7 days of backups locally for quick recovery, depending on business needs.
Prioritize which backup files to upload to the cloud based on recovery time objectives.
Method/Condition | Estimated Time |
---|---|
Streaming server setup | 9 hours |
Reported time by user | 23 hours |
Factors affecting time | Network bandwidth, overhead, inefficiencies, competing network usage |
Tip: Always copy backup files to another location. Having backups in a different location protects against host or data center failures.
After completing pre-update checks and backups, teams can begin the MySQL Update process:
Stop the MySQL server.
Install MySQL 8.4 LTS using the package manager or official installer for the operating system.
Start the MySQL server with the new version.
Run the MySQL Shell 9.4.0 and execute util.checkForServerUpgrade()
to identify any remaining compatibility issues.
Apply any required schema or configuration changes highlighted by the upgrade checker.
Run mysql_upgrade
to update system tables and objects.
Alert: The MySQL Update process may require downtime. Plan the upgrade during a maintenance window to minimize impact.
Verification ensures the MySQL Update succeeded and the database operates as expected. Teams should use several methods to validate the upgrade:
Method Type | Validation Methods |
---|---|
Functional | Application smoke tests, migrations, background jobs |
Performance | TPS/latency with sysbench; compare digest outliers |
Indexes | Verify plan stability for top N queries |
Error Monitoring | Watch deadlocks, lock waits, and error counters |
Common verification errors may occur after a MySQL Update. For example, the error “Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted” can appear when viewing or running stored procedures, inserting into tables with triggers, or executing SELECT statements with misspelled function names. To resolve this, teams should dump and restore stored procedures after the upgrade. Running mysql_upgrade
may also help, but it does not always fix the issue.
Reminder: Always monitor logs and error counters after a MySQL Update. Early detection of issues helps maintain database stability.
Many teams encounter problems during the upgrade from MySQL 8.0 to 8.4 LTS. The most frequently reported issues include:
The MySQL repository remains on the old version, such as “focal,” even after attempts to upgrade.
The option for MySQL 8.4 does not appear in the repository list.
These problems often slow down the upgrade process. Administrators should check repository settings and confirm that the system points to the correct MySQL version.
If the upgrade fails, rerunning the process with the same target version can resolve inconsistencies among database instances.
Some users also face network-related issues, such as insufficient IP addresses. Editing the subnet mask or restoring from a backup to a new database system with a larger IP range can help.
Migrating data between MySQL 8.0 and 8.4 LTS requires careful planning. Teams should follow these best practices to avoid data loss:
Confirm the current MySQL version using SELECT VERSION();
. The version must be at least 8.0.21.
Make a full backup of the database before starting the upgrade. Each backup type offers different advantages.
Test the restore process on another server to ensure data recovery works.
Run the Upgrade Checker Utility to find issues that could block the upgrade.
Validate data after the upgrade. Check for missing or extra records and confirm that data types match expectations.
Teams who test their backups and validate data after migration reduce the risk of losing important information.
MySQL 8.4 LTS supports many operating systems and platforms. The official documentation lists all supported platforms.
Administrators should always check the MySQL support page for the latest updates.
Compatibility with the operating system and compiler version is essential for a successful upgrade.
Keeping systems updated and reviewing platform requirements helps teams avoid unexpected problems during the upgrade process.
Teams should review configuration files before starting a MySQL Update. MySQL 8.4 LTS removes or changes several server startup options. Administrators must update settings to avoid startup errors. The following table highlights important configuration changes:
Configuration Change | Description |
---|---|
Removal of server startup options | Certain options have been removed in MySQL 8.4, requiring updates to configuration files. |
lower_case_table_names setting | If set to 1, ensure all schema and table names are lowercase before upgrading to avoid errors. |
Handling redo log files | If the upgrade fails, remove redo log files and restart the MySQL 8.3 server to resolve issues. |
Several deprecated options from MySQL 8.0 no longer work in 8.4 LTS. Teams should remove or replace these settings:
PASSWORD() function is gone. Use CREATE USER and ALTER USER instead.
tx_isolation variable is removed. Switch to transaction_isolation.
Expire_logs_days is replaced by binlog_expire_logs_seconds.
Administrators should always check configuration files for unsupported options before restarting the server.
MySQL 8.4 LTS introduces new default values for buffer and cache settings. These changes help improve performance and reliability. The table below compares key parameters between MySQL 8.0 and 8.4 LTS:
Parameter | MySQL 8.0 Default Value | MySQL 8.4 LTS Default Value |
---|---|---|
innodb_doublewrite_files | innodb_buffer_pool_instances * 2 | 2 |
innodb_doublewrite_pages | innodb_write_io_threads (4) | 128 |
innodb_flush_method | fsync | O_DIRECT (or fsync) |
innodb_io_capacity | 200 | 10000 |
innodb_log_buffer_size | 16 MB | 64 MB |
innodb_numa_interleave | OFF | ON |
innodb_buffer_pool_instances | 8 (or 1 if BP < 1 GB) | Dynamic based on BP size and CPUs |
For best results, teams should:
Adjust TCP buffer sizes for better network performance.
Increase TCP backlog to handle more incoming connections.
Disable unnecessary network services to reduce security risks.
Set query_cache_size to 10%–20% of available memory.
Enable query_cache_type for effective caching.
Administrators should also:
Index columns used often in WHERE clauses and JOINs.
Avoid too many indexes, which slow down writes.
Use composite indexes for multi-column queries, matching the order in the WHERE clause.
Regular maintenance keeps MySQL 8.4 LTS running smoothly. Teams should:
Monitor logs for errors and warnings.
Test backups and restore procedures monthly.
Review index usage and remove unused indexes.
Update configuration files after each MySQL Update.
Schedule downtime for major upgrades and test changes in a staging environment first.
Consistent maintenance and careful configuration help teams avoid downtime and data loss. Administrators who follow these best practices ensure long-term stability and performance.
Upgrading MySQL requires careful planning and attention to detail. Teams should follow these steps:
Update the my.cnf
file, removing deprecated settings.
Change user authentication to caching_sha2_password
.
Convert character sets as needed.
Apply all configuration changes for MySQL 8.4.
Creating and testing backups protects data from unexpected issues. Teams should verify upgrades in a test environment before moving to production. The official MySQL documentation offers the latest procedures. Following best practices ensures long-term support, stability, and access to new features.
Teams should check the current MySQL version, review release notes, and create a full backup. Running the upgrade checker helps find issues. Testing the restore process confirms data safety.
Tip: Always test backups on a separate server before starting the upgrade.
Administrators should update repository sources to point to the correct MySQL version. They can run:
|
|
Checking the official documentation helps resolve version mismatches.
Most existing hardware supports MySQL 8.4 LTS. Teams should check operating system and compiler compatibility. Upgrading memory or storage may improve performance, but it is not required for most installations.
Teams should dump stored procedures before the upgrade. After upgrading, they should restore procedures and run mysql_upgrade
. This process fixes common errors with procedure tables.
Teams should test backups monthly. Regular testing ensures data can be restored quickly. Scheduling backup tests helps maintain database reliability.
Note: Testing backups prevents data loss and supports disaster recovery plans.
SQLFlash is your AI-powered SQL Optimization Partner.
Based on AI models, we accurately identify SQL performance bottlenecks and optimize query performance, freeing you from the cumbersome SQL tuning process so you can fully focus on developing and implementing business logic.
Join us and experience the power of SQLFlash today!.