Verify a migration

This page describes how to confirm that your migrated data is complete and accurate. At a minimum, you should verify that your tables exist in the migrated Cloud SQL databases instance.

  1. Connect to your Cloud SQL instance with a tool where you can run SQL commands against your migrated databases.

    For more information on connecting to Cloud SQL instances, see Connection options in Cloud SQL documentation.

  2. Run SQL commands to verify your migrated data. For example:

    List all databases

    Run the following command to verify if your destination Cloud SQL contains all the source databases you wanted to migrate:

    SHOW databases;

    List all tables in a database

    Run the following command to check if your migrated database contains all the necessary tables:

    SHOW tables;

    Check table content and definitions

    Run the following commands to verify the correctness of a specific migrated table:

    1. View the table definition:
      SHOW CREATE TABLE TABLE_NAME;
    2. Verify the table contents:
      SELECT * FROM TABLE_NAME;

For automated, large-scale validation across your source and destination databases, you can also use the open-source Data Validation Tool (DVT). DVT is a Python CLI tool that compares schemas, row counts, column aggregations, and row-level hashes between source and destination MySQL instances to verify data completeness and accuracy before cutover.