This page describes how to find and use Cloud Logging to view and query logs for your Database Migration Service instance.

Database Migration Service logging reference

See the Google Cloud platform logging page for definitions of log file names, monitored resources, and payloads for Database Migration Service.

View Cloud SQL logs

Database Migration Service uses Cloud Logging. See the Cloud Logging documentation for complete information and review the Cloud SQL sample queries.

To view logs for your Cloud SQL instance log entries:


  1. Go to the Logs Viewer
  2. Select an existing Cloud SQL project at the top of the page.
  3. In the Query builder, add the following:
    • Resource: select Cloud SQL Database. In the dialog, select a Cloud SQL instance.
    • Log names: scroll to the Cloud SQL section and select appropriate log files for your instance. For example:
      • cloudsql.googlapis.com/mysql-general.log
      • cloudsql.googleapis.com/mysql.err
    • Severity: select a log level.
    • Time range: select a preset or create a custom range.


Use the gcloud logging command to view log entries. In the example below, replace PROJECT_ID. The limit flag is an optional parameter that indicates the maximum number of entries to return.

gcloud logging read "projects/[PROJECT_ID]/logs/cloudsql.googleapis.com/mysql-general.log" --limit=10