Open ekirkland opened 5 years ago
I haven't run gh-ost on Google Cloud SQL, but I can help with the --gcp
flag.
It currently just changes the way the connection is validated because GCP sets the port to NULL:
What trouble are you seeing with enabling the binary logging on the replica? Is that option disabled?
https://cloud.google.com/sql/docs/mysql/backup-recovery/restoring#enablingpitr
If their interface (and gcloud
route) prohibits it, a (costly) alternative would be to daisy chain a replica maybe?
master -> replica1 -> replica2
^^ run gh-ost against this server
As far as I know, ~GCP~ Google Cloud SQL doesn't prohibit that sort of topology (but I could be totally wrong!). And to support it, replica1
would have to enable binary logging.
Here are some tips from GCP CloudSQL doc, see this link: https://cloud.google.com/sql/docs/mysql/replication/tips
So I suspect GCP may not allow the binary logging on the replica.
Thanks @sunkaiqin TIL!
Skimming that doc this popped out to me: https://cloud.google.com/sql/docs/mysql/replication/tips#external-replica
It looks like you could run a replica on non-CloudSQL that replicates from CloudSQL? It may be annoying to set up a replica elsewhere, but the reliability requirements of that server may be much lower if nothing is operationally depending on it. And you could have gh-ost run against that replica?
@zmoazeni Happy to work with gh-ost and it is such an amazing tool 👍
Yeah, external replica could be a way to go. As you mentioned we lose the convenience of the managed services from GCP.
Maybe GCP team has more insight regarding replica binlog enablement. Or they could provide this option for us to utilize gh-ost on GCP easily 😄
Thanks anyway for the information.
looks like you can now enable binary logging on read replicas: https://cloud.google.com/sql/docs/mysql/replication#bin-log-replica
We have been successfully using gh-ost with RDS for a few years and now we'd like to use it with an instance that is going to be running in Google Cloud SQL. The problem we're facing is that we can't find out if it's possible to enable binary logging on the replica, and we have had problems in the past in RDS when trying to migrate on master.
I did some searching on here and didn't find too much conversation on using gh-ost with GCP other than the --gcp flag. Could I get some more insight into what this does? Does it allow us to still use the replica even without the binary logging enabled?