0

I just set up a MySQL replication on Google Cloud Platform using my external on-prem server as replication master. I just follow this guide https://cloud.google.com/sql/docs/mysql/replication/configure-external-master and everything worked as expected. The replication is running. Now I want to access and query the replica. On the replica there are two default users 'root'@'localhost' and ''@'localhost'.

How can I access the server with this user? I don't know the password.

How can I add a new user ('root'@'%')? The console says "Operation not permitted for a read replica".

The Google Cloud "External Master" (the auxiliary GCP instance created to mimic my on-prem DB is not accessible from the console (i.e. I cannot change any setting on it). I'm not sure if this is a normal condition or if there is some issue with this issue.

I will really appreciate any help! Thanks in advance.

This is what describe returns for the master instance (IP hidden by me):

gcloud sql instances describe wfdb-aux-master

backendType: EXTERNAL
databaseVersion: MYSQL_5_5
etag: '"7nzH-h2yIa30FGKFRs9YFu88s0g/df2dLoOVIyfhgfDI0wul1jXwbV0"'
instanceType: ON_PREMISES_INSTANCE
kind: sql#instance
name: wfdb-aux-master
onPremisesConfiguration:
  hostPort: XX.XX.XX.XX:3306
  kind: sql#onPremisesConfiguration
project: wonder-fleet
region: europe-west1
selfLink: https://www.googleapis.com/sql/v1beta4/projects/wonder-fleet/instances/wfdb-aux-master
0

As per step four of the Creating the external master configuration documentation, you should be able to update your replication user by following the Creating and Managing MySQL Users guide.

Once you have a user account and credentials, you can then use them to connect to your instance using any of the guided methods.

I no longer see the instance you mentioned in your post, but if you run into any issues like this again in the future with accessing your Cloud SQL instance, it is recommended to report this in a Public Issue Tracker.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.