Google Professional Cloud Database Engineer Question 208
Single answerGoogle Cloud PlatformYour company is migrating its on-premises MySQL database to Cloud SQL for MySQL on Google Cloud. The database is critical for real-time transactions, so downtime during the migration must be minimized. Which approach should you use to achieve this?
- A
Use the Database Migration Service with continuous replication enabled.
- B
Export the database as a SQL dump and import it into Cloud SQL.
- C
Set up a manual replication process using gsutil to sync data between on-premises and Cloud SQL.
- D
Use a third-party tool like pg_dump to perform the migration and replication.
Show answer and explanation
Correct answer: A
Explanation
Database Migration Service with continuous replication is the most appropriate solution for minimizing downtime during a MySQL database migration to Cloud SQL. It enables real-time replication of data changes, allowing the source database to remain operational until the final cutover.
- A. Correct.
This is the correct option. Google Cloud's Database Migration Service supports continuous replication for MySQL, which ensures minimal downtime during the cutover phase.
- B. Incorrect.
This method involves downtime because the database must be taken offline to create and import the SQL dump file. It is not suitable for real-time transactional workloads.
- C. Incorrect.
gsutil is a tool for transferring files to and from Google Cloud Storage and is not designed for database replication or migrations.
- D. Incorrect.
pg_dump is a tool for PostgreSQL, not MySQL. It is also not suitable for handling replication or real-time transactional workloads.