Verifying a migration
In this page, you confirm that the migration job migrated data from your source database instance to the destination Cloud SQL database instance correctly.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:
- Go to the SQL Instances page in the Google Cloud console.
- Click the read replica entry of your migration job.
- Click the Activate Cloud Shell icon that appears in the upper-right region of the page.
- At the Cloud Shell prompt, press Enter.
- Optional: If an Authorize Cloud Shell dialog box appears, then click Authorize.
- 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.
- Run SQL commands to verify the migration. For example:
- At the mysql prompt, enter
show databases;
to list the databases and verify that you see your source database instance. - At the mysql prompt, enter
use source_database_instance_name;
because you want to see the tables associated with this database instance. - At the mysql prompt, enter
show tables;
to see the tables of this instance. - At the mysql prompt, enter
select * from table_name;
to see the information that's contained in a table of your source database instance. - Verify that you see the correct information in the table.
- At the mysql prompt, enter
If everything you check is as you expect, then Database Migration Service has migrated the data correctly.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-26 UTC.