Google Professional Cloud Database Engineer Question 216
Single answerGoogle Cloud PlatformYou are managing a hybrid database architecture where a MySQL database is hosted on-premises, and a replica is hosted on Google Cloud using Cloud SQL. A recent business requirement mandates that any updates made to the Cloud SQL instance should be replicated back to the on-premises MySQL database. Which of the following steps is critical to successfully implement reverse replication from Google Cloud SQL to the on-premises MySQL database?
- A
Enable binary logging on the Cloud SQL instance with the appropriate flags.
- B
Configure the on-premises MySQL instance as a primary database.
- C
Set up a read replica in Google Cloud to act as an intermediary for replication.
- D
Ensure the on-premises MySQL database has network access to the Cloud SQL instance.
Show answer and explanation
Correct answer: A
Explanation
To implement reverse replication from Cloud SQL to an on-premises MySQL database, enabling binary logging on the Cloud SQL instance is critical. Binary logging records all database modifications and is a prerequisite for replication. Once binary logging is enabled, the on-premises MySQL database can be configured as a replica to pull updates from the Cloud SQL instance.
- A. Correct.
Correct. Binary logging is required to enable replication, including reverse replication, as it logs all changes to the database. Without enabling binary logging with appropriate flags, reverse replication cannot be configured.
- B. Incorrect.
Incorrect. The on-premises MySQL instance needs to act as a replica, not the primary, to receive updates from the Cloud SQL instance.
- C. Incorrect.
Incorrect. Setting up a read replica in Google Cloud is not relevant for reverse replication to the on-premises database.
- D. Incorrect.
Incorrect. While network access is necessary, it is not the primary step to set up reverse replication. Binary logging must be enabled first.