Auf dieser Seite bestätigen Sie, dass der Migrationsjob Daten korrekt aus der Quelldatenbankinstanz in die Cloud SQL-Zieldatenbankinstanz migriert hat.
Prüfen Sie mindestens, ob die Datenbankinstanz und ihre Tabellen in der Cloud SQL-Instanz vorhanden sind. Sie können auch die Zeilenanzahl oder den genauen Inhalt der Tabellen prüfen.
Die folgenden Schritte zeigen ein minimales Beispiel:
Rufen Sie in der Google Cloud Console die Seite SQL-Instanzen auf.
Klicken Sie auf den Lesereplikateintrag Ihres Migrationsjobs.
Klicken Sie rechts oben auf der Seite auf das Symbol Cloud Shell aktivieren.
Drücken Sie in Cloud Shell die Eingabetaste.
Optional: Wenn das Dialogfeld Cloud Shell autorisieren angezeigt wird, klicken Sie auf Autorisieren.
Geben Sie bei der Eingabeaufforderung Passwort eingeben das Passwort ein, das Sie unter Cloud SQL-Zielinstanz definieren und erstellen angegeben oder das der Database Migration Service für Sie generiert hat.
Führen Sie SQL-Befehle aus, um die Migration zu prüfen. Beispiel:
Geben Sie in der Eingabeaufforderung mysql den Wert show databases; ein, um die Datenbanken aufzulisten und zu prüfen, ob die Quelldatenbankinstanz angezeigt wird.
Geben Sie in der Eingabeaufforderung mysql den Wert use source_database_instance_name; ein, um die mit dieser Datenbankinstanz verknüpften Tabellen aufzurufen.
Geben Sie in der Eingabeaufforderung mysql den Wert show tables; ein, um die Tabellen dieser Instanz aufzurufen.
Geben Sie in der Eingabeaufforderung mysql den Wert select * from table_name; ein, um die Informationen abzurufen, die in einer Tabelle Ihrer Quelldatenbankinstanz enthalten sind.
Prüfen Sie, ob die Informationen in der Tabelle korrekt sind.
Wenn alles wie erwartet ist, wurden die Daten vom Database Migration Service korrekt migriert.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[[["\u003cp\u003eThis guide provides steps to verify that a migration job has successfully transferred data from a source database to a destination Cloud SQL database instance.\u003c/p\u003e\n"],["\u003cp\u003eVerification involves checking for the existence of the migrated database instance and its tables in the Cloud SQL instance.\u003c/p\u003e\n"],["\u003cp\u003eYou can perform checks in Cloud Shell such as listing databases, selecting a source instance database, listing its tables, and viewing data contained in those tables to verify data.\u003c/p\u003e\n"],["\u003cp\u003eThe migration is considered successful if the information checked in the Cloud SQL instance matches what is expected from the source database instance.\u003c/p\u003e\n"]]],[],null,["# Verify a migration\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/database-migration/docs/postgres/verify-migration \"View this page for the PostgreSQL version of Database Migration Service.\") \\| [PostgreSQL to AlloyDB](/database-migration/docs/postgresql-to-alloydb/verify-migration \"View this page for the PostgreSQL to AlloyDB version of Database Migration Service.\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nVerifying a migration\n---------------------\n\nIn this page, you confirm that the migration job migrated data from your source database instance to the destination Cloud SQL database instance correctly.\n\n\u003cbr /\u003e\n\nAt a minimum, verify that the database instance and its tables exist in the\nCloud SQL instance. You can also verify the tables' row counts or exact\ncontents.\n\n\nThe following steps show a minimal example:\n\n1. Go to the [SQL Instances page](https://console.cloud.google.com/sql) in the Google Cloud console.\n2. Click the read replica entry of your migration job.\n3. Click the **Activate Cloud Shell** icon that appears in the upper-right region of the page.\n4. At the Cloud Shell prompt, press **Enter**.\n5. Optional: If an **Authorize Cloud Shell** dialog box appears, then click **Authorize**.\n6. 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](/database-migration/docs/mysql/create-migration-job#dest).\n7. Run SQL commands to verify the migration. For example:\n 1. At the **mysql** prompt, enter `show databases;` to list the databases and verify that you see your source database instance.\n 2. At the **mysql** prompt, enter `use `\u003cvar translate=\"no\"\u003esource_database_instance_name\u003c/var\u003e`;` because you want to see the tables associated with this database instance.\n 3. At the **mysql** prompt, enter `show tables;` to see the tables of this instance.\n 4. At the **mysql** prompt, enter `select * from `\u003cvar translate=\"no\"\u003etable_name\u003c/var\u003e`;` to see the information that's contained in a table of your source database instance.\n 5. Verify that you see the correct information in the table.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nIf everything you check is as you expect, then Database Migration Service has migrated the data correctly."]]