Google Cloud Associate Data Practitioner — Question 73
Your organization's website uses an on-premises MySQL as a backend database. You need to migrate the on-premises MySQL database to Google Cloud while maintaining MySQL features. You want to minimize administrative overhead and downtime. What should you do?
Answer options
- A. Use a Google-provided Dataflow template to replicate the MySQL database in BigOuery.
- B. Install MySQL on a Compute Engine virtual machine. Export the database files using the mysqldump command. Upload the files to Cloud Storage, and import them into the MySQL instance on Compute Engine.
- C. Use Database Migration Service to transfer the data to Cloud SQL for MySQL, and configure the on-premises MySQL database as the source.
- D. Export the database tables to CSV files, and upload the files to Cloud Storage. Convert the MySQL schema to a Spanner schema, create a JSON manifest file, and run a Google-provided Dataflow template to load the data into Spanner.
Correct answer: C
Explanation
The correct answer is C because the Database Migration Service is specifically designed to facilitate the migration of databases to Cloud SQL with minimal downtime and administrative tasks. Options A and D are not suitable as they involve different databases and may not maintain MySQL features. Option B, while feasible, requires more manual steps and could lead to longer downtime compared to using the Database Migration Service.