Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Changing the Zone of SQL instance on Cloud SQL

Hi,
I'm trying to change the region of a SQL instance that is hosted on Cloud SQL. My question is - If I change the zone from say 'us-central-1f' to 'us-central-1a' will that change the public or private IP of that instance?
Also, in case I change the instance from 'Single Zone' to 'Multiple Zone' will that change the IP addresses (public and private) of the instance and would changing the instance to 'Multiple Zone' incur any additional costs?

Solved Solved
0 4 2,430
1 ACCEPTED SOLUTION

Hi @mudasir ,

Per this doc: https://cloud.google.com/sql/docs/mysql/private-ip#quick-reference, “The private IP address of the Cloud SQL instance is static; it doesn't change”.

I tried changing the zone for an instance, and found that the public IP address did not change.

Yes, the pricing for multi-zone (HA) instances is different from the pricing for single-zone instances. For details, please see https://cloud.google.com/sql/pricing.

Note that when you change the zone or when you add a standby instance in another zone (i.e., enable HA), the instance will be shut down and restarted. Existing connections, open files, and operations will be shut down as well. The instance will restart according to the configured activation policy.

PS: You can’t change the region of a Cloud SLQ instance. But if you want to move the database to a different region, you could migrate it by using the cross-region replication feature.

I hope this helps.

View solution in original post

4 REPLIES 4

Hi @mudasir ,

Per this doc: https://cloud.google.com/sql/docs/mysql/private-ip#quick-reference, “The private IP address of the Cloud SQL instance is static; it doesn't change”.

I tried changing the zone for an instance, and found that the public IP address did not change.

Yes, the pricing for multi-zone (HA) instances is different from the pricing for single-zone instances. For details, please see https://cloud.google.com/sql/pricing.

Note that when you change the zone or when you add a standby instance in another zone (i.e., enable HA), the instance will be shut down and restarted. Existing connections, open files, and operations will be shut down as well. The instance will restart according to the configured activation policy.

PS: You can’t change the region of a Cloud SLQ instance. But if you want to move the database to a different region, you could migrate it by using the cross-region replication feature.

I hope this helps.

Hi @kumards 
Thanks for the reply, this helps!

You're welcome @mudasir . Feel free to mark the answer as a solution if it resolves your questions.

Hello @kumards / Team,

When we wanted to change the PostgreSQL instance availability type from Regional to Zonal.
The instance should be in stopped state? This is for Non-Prod Instance. When we are looking for 
availability type change,
We are getting the error - 
Invalid request since instance is not running, Any thoughts?