MySQL 8.0 to 8.4 LTS Upgrade Guide — Part 4: Rollback Strategy and Post-Upgrade Validation

Plan your MySQL 8.4 rollback strategy before you start. Plus the complete post-upgrade validation checklist — version checks, replication health, optimizer stats, and monitoring.

MySQL 8.0 to 8.4 LTS Upgrade Guide — 5-Part Series

  1. Part 1: Pre-Upgrade Preparation
  2. Part 2: Upgrade Testing
  3. Part 3: Upgrade Execution
  4. Part 4: Rollback and Post-Upgrade Validation (You Are Here)
  5. Part 5: Change Management, Troubleshooting, and Checklist

CRITICAL: Always have a tested rollback plan before beginning any upgrade. MySQL does NOT support downgrading from 8.4 back to 8.0 using the data directory. The only paths are: redirect traffic (replication approach) or restore from backup.

Replication-Based Rollback (Recommended)

If you used the replication-based or rolling replica upgrade approach, rollback is straightforward:

  1. Redirect application connections back to the original MySQL 8.0 source
  2. The 8.0 source was untouched and continues to hold the authoritative data
  3. Stop and decommission the 8.4 instance(s)

BEST PRACTICE: This is the primary advantage of the replication-based approach: instant rollback with zero data loss. This is why it's the recommended approach for production systems.

Logical Backup Rollback (In-Place Upgrade)

If the in-place upgrade fails, you must restore from the pre-upgrade backup:

  1. Stop the failed MySQL 8.4 instance
  2. Install a fresh MySQL 8.0.37 instance (on same or different server)
  3. Restore the logical backup taken before the upgrade:
mysql -u root -p < full_backup_pre_upgrade.sql
  1. If you need to recover writes between the backup time and the upgrade start, apply the 8.0-era binary logs:
mysqlbinlog --start-position=XXX binlog.000YYY | mysql -u root -p
  1. Redirect application connections back to the 8.0 instance

CRITICAL: Binary logs generated by the 8.4 instance CANNOT be applied to an 8.0 instance due to format incompatibilities. Any writes that occurred on MySQL 8.4 after cutover are LOST in a rollback to 8.0. This is why minimizing the cutover window and validating quickly is essential.

WARNING: Rollback time depends on data size. For a 10TB dataset, a full logical restore could take 10-20+ hours. Plan your maintenance window to accommodate the worst-case rollback duration.

Reverse Replication (8.4 to 8.0)

Not officially supported by Oracle. Binary log format differences between major versions can cause replication failures or silent data corruption. Do not rely on this.

Physical Backup + Binary Log Replay

Technically possible but complex, error-prone, and not officially supported as a downgrade path. Carries significant risk of data inconsistency. Use logical backup restore instead.

Need a rollback plan reviewed?

A tested rollback plan is your insurance policy. If you want an experienced DBA to review your upgrade and rollback procedures before you go live, book a free assessment.

Book Free Assessment →

Immediate Checks (First 30 Minutes)

After a successful upgrade, thorough validation ensures the system is healthy and production-ready.

Verify MySQL version:

SELECT VERSION();  -- Expected: 8.4.8

Review the error log for warnings or errors:

tail -500 /var/log/mysql/mysqld.log
grep -i 'error\|warning' /var/log/mysql/mysqld.log | tail -50

Verify all system tables upgraded successfully:

mysqlcheck -u root -p --all-databases --check

Verify all user accounts can authenticate:

SELECT user, host, plugin FROM mysql.user ORDER BY plugin;

Run the Upgrade Checker to confirm no remaining issues:

mysqlsh -- util checkForServerUpgrade root@localhost:3306 --target-version=8.4.8

Replication Validation (If Applicable)

Verify replication status:

SHOW REPLICA STATUS\G
-- Verify: Replica_IO_Running = Yes
-- Verify: Replica_SQL_Running = Yes
-- Verify: Seconds_Behind_Source = 0

Verify GTID consistency (if using GTID):

SELECT @@gtid_executed;

Test failover procedures in a controlled manner.

Refresh Optimizer Statistics

After a major version upgrade, the query optimizer may use different cost models. Refreshing statistics on key tables prevents query plan regressions:

-- For specific critical tables:
ANALYZE TABLE schema.important_table;

-- For all tables (run during low-traffic period):
mysqlcheck -u root -p --all-databases --analyze

BEST PRACTICE: Monitor slow query log closely for 48 hours after upgrade. Compare query execution plans (EXPLAIN) for your top queries against pre-upgrade baselines to catch optimizer regressions early.

Application and Performance Monitoring

Post-Upgrade Housekeeping

Part 4 Quick Checklist

Continue the Series

  1. ← Part 3: Upgrade Execution
  2. Part 4: Rollback and Post-Upgrade Validation (You Are Here)
  3. Part 5: Change Management, Troubleshooting, and Checklist →
M

Mughees — ReliaDB

ReliaDB is a specialist DBA team for PostgreSQL and MySQL performance, high availability, and cloud database optimization. More about ReliaDB →