MySQL Database Migration Cutover Checklist

halfbrain_logo512adminJune 19, 2026
3 lượt xem

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

  1. Define source and target database.
  2. Take a fresh source backup.
  3. Restore backup to target database.
  4. Compare table count and critical row counts.
  5. Put application into maintenance mode if writes matter.
  6. Update application database config.
  7. Test application against target database.
  8. Monitor errors and writes after cutover.
  9. Keep source database available temporarily.
  10. 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.

Checklist Type Basic DevOps
Level Advanced
Risk Level High Risk
Estimated Time 60–180 minutes

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

  1. Define source.
  2. Define target.
  3. Backup source.
  4. Restore target.
  5. Compare tables.
  6. Control writes.
  7. Update config.
  8. Test app.
  9. Monitor after cutover.
  10. Keep rollback path.

Verification Steps

  1. Target database contains expected data.
  2. Application connects to target.
  3. Critical workflows work.
  4. No new database errors appear.
  5. Rollback condition is documented.

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

Share:

Disclaimer: The guides, checklists, commands, and examples on HalfBrain.net are provided for educational and operational reference only. Server environments, hosting providers, software versions, security settings, and WordPress configurations can vary, so you should always review commands before running them on your own system. We do our best to keep the content accurate and useful, but we cannot guarantee that every command, configuration, or recommendation will fit every environment. Always back up your website, database, and server configuration before making changes. HalfBrain.net is not responsible for data loss, downtime, security incidents, misconfiguration, or other issues that may result from applying the information on this website. Use the material at your own discretion.

Leave a Reply

Your email address will not be published. Required fields are marked *