Verify a migration

In this page, you confirm that the migration job correctly migrated data from your source database instance to the destination Cloud SQL database instance.

At a minimum, verify that the database instance and its tables exist in the Cloud SQL instance. You can also verify the tables' row counts or exact contents.

The following steps show a minimal example:

  1. Go to the SQL Instances page in the Google Cloud Console.
  2. Click the read replica entry of your migration job.
  3. Scroll down until the Connect to this instance pane appears, and then click Connect using Cloud Shell.
  4. At the Cloud Shell prompt, press Enter.
  5. Optional: If an Authorize Cloud Shell dialog box appears, then click Authorize.
  6. At the Enter password prompt, enter the password that you either provided or that Database Migration Service generated for you in Define and create the destination Cloud SQL instance.
  7. Run SQL commands to verify the migration. For example:
    1. At the mysql prompt, enter show databases; to list the databases and verify that you see your source database instance.
    2. At the mysql prompt, enter use source_database_instance_name; because you want to see the tables associated with this database instance.
    3. At the mysql prompt, enter show tables; to see the tables of this instance.
    4. At the mysql prompt, enter select * from table_name; to see the information that's contained in a table of your source database instance.
    5. Verify that you see the correct information in the table.

If everything you check is as you expect, then the Database Migration Service for MySQL has correctly migrated the data.