Google Professional Cloud Database Engineer

Google Professional Cloud Database Engineer

Get started today

Ultimate access to all questions.


How can you migrate an on-premises MySQL database to Cloud SQL for MySQL with minimal downtime while ensuring transaction consistency, given that the on-premises database runs a supported MySQL version and uses the InnoDB storage engine?




Explanation:

The correct approach for migrating a critical, on-premises MySQL database to Cloud SQL for MySQL while preserving transactions and minimizing downtime is to use the Database Migration Service with continuous replication. This method ensures that transactions are preserved and downtime is minimized by continuously replicating data from the on-premises database to Cloud SQL. Once the migration is complete, the Cloud SQL instance can be promoted and applications can be connected to it. Option A describes this approach accurately. Options B, C, and D involve methods that either do not ensure transaction preservation (B) or require significant downtime (C and D), making them less suitable for the given requirements.