MySQL Database Migration Cutover Checklist
A database migration cutover moves an application from one database source to another. The risk is data loss, downtime, wrong credentials, DNS or host mismatch, stale writes and failed rollback.
Core principle
A safe cutover controls writes, verifies data, switches connection config and keeps a rollback path until the new database is trusted.
Checklist
- Define source and target database.
- Take a fresh source backup.
- Restore backup to target database.
- Compare table count and critical row counts.
- Put application into maintenance mode if writes matter.
- Update application database config.
- Test application against target database.
- Monitor errors and writes after cutover.
- Keep source database available temporarily.
- Document cutover time and rollback condition.
Reusable lesson
This applies to WordPress migration, VPS moves, database separation, staging-to-production changes and managed database adoption.
When to Use This Checklist
Use this checklist when moving a website or application from one MySQL database to another server or database instance.
Required Tools
Source database, target database, backup file, application config, maintenance mode, SSH access, rollback plan
Before You Start
Do not cut over a write-heavy application without controlling writes or accepting possible data inconsistency.
Structured Checklist Steps
- Define source.
- Define target.
- Backup source.
- Restore target.
- Compare tables.
- Control writes.
- Update config.
- Test app.
- Monitor after cutover.
- Keep rollback path.
Verification Steps
- Target database contains expected data.
- Application connects to target.
- Critical workflows work.
- No new database errors appear.
- Rollback condition is documented.
Rollback Plan
If cutover fails, point the application back to the original source database and investigate the target database offline before trying again.
Common Mistakes
- No fresh backup.
- No row count comparison.
- Writes continue during migration.
- Wrong DB_HOST in config.
- Deleting source database too early.
Related Commands
mysqldump -u db_user -p source_db > source_db.sql
mysql -u db_user -p target_db < source_db.sql
mysql -u db_user -p -e "SHOW TABLES FROM target_db;"
mysql -u db_user -p -e "SELECT COUNT(*) FROM target_db.wp_posts;"
grep DB_ wp-config.php