Instance Settings

This page provides information about all of the settings available for Google Cloud SQL instances, for both First Generation and Second Generation instances.

Settings for Second Generation instances

Setting Modifiable after creation? Possible values
Instance ID N Composed of lowercase letters, numbers, and hyphens; must start with a letter.
Database version N MySQL 5.7
MySQL 5.6
Region N asia-east1 — Taiwan
asia-northeast1 — Tokyo
australia-southeast1 — Sydney
europe-west1 — Belgium
europe-west2 — London
europe-west3 — Frankfurt
southamerica-east1 — São Paulo
us-central1 — Iowa
us-east1 — South Carolina
us-east4 — Northern Virginia
us-west1 — Oregon
Zone Y The possible values depend on the region.
Machine type Y db-f1-micro
db-g1-small
db-n1-standard-1
db-n1-standard-2
db-n1-standard-4
db-n1-standard-8
db-n1-standard-16
db-n1-standard-32
db-n1-standard-64
db-n1-highmem-2
db-n1-highmem-4
db-n1-highmem-8
db-n1-highmem-16
db-n1-highmem-32
db-n1-highmem-64
Storage type N SSD (default value)
HDD
Storage capacity Y
(Increase only)
Standard and high memory machine types: up to 10230 GB.
Shared-core machine types (db-f1-micro and db-g1-small): up to 3062 GB.
Automatic storage increase Y On (default value)
Off
Automatic storage increase limit Y In GiBs. 0 (the default) means there is no limit.
Backups and binary logging Y
(see note)
On (default value)
Off
Maintenance window Y Day of the week, and hour.
Maintenance timing Y Any (default value)
Later
Earlier
Authorized networks Y IP addresses or ranges of addresses, in CIDR notation.
Activation policy Y ALWAYS
NEVER
Cloud SQL flags Y See Configuring Cloud SQL Flags.
Instance ID
The instance ID is the name of the instance. It is used to uniquely identify your instance within the project. Choose an instance name that is aligned with the purpose of the instance when possible. Instance names must have 98 characters or less. You do not need to prepend the project ID onto the instance ID. This is done automatically where appropriate (for example, in the log files).
Region
The Google Cloud Platform region where your instance is located. To improve performance, keep your data close to the services that need it. For more information, see Instance Locations.
Zone
The Google Cloud Platform zone where your instance is located. If you are connecting from a Compute Engine instance, select the zone where the Compute Engine instance is located. Otherwise, you should accept the default zone. For more information, see Instance Locations.
Machine Type

Determines memory, virtual cores, and other resources available to your Cloud SQL instance. if possible, your largest table size should fit in memory.

Your machine type affects the cost of your instance. For more information, see Instance Pricing. You can also see pricing for various scenarios with the Pricing Calculator.

Database version
Unless you need a capability provided only by a specific version, you should accept the default database version.
Storage type
Choosing SSD, the default value, provides your instance with SSD storage. SSDs provide lower latency and higher data throughput. If you do not need high-performance access to your data, for example for long-term storage or rarely accessed data, you can reduce your costs by choosing HDD.
Storage capacity
Choose a capacity to fit your database size. After you have created your instance, you can increase your storage capacity, but you cannot decrease it. The amount of storage capacity allocated for your instance affects the cost of your instance. For more information, see Storage and Networking Pricing.
Automatic storage increase

If this setting is enabled, your available storage is checked every 30 seconds. If available storage falls below a threshold size, additional storage capacity is automatically added to your instance.

The size of the threshold and the amount of storage that is added to your instance depends on the amount of storage currently provisioned for your instance, up to a maximum size of 25 GB. The current storage capacity is divided by 25, and the result rounded down to the nearest integer. This result is added to 5 GB to produce both the threshold size and the amount of storage that is added in the event that the available storage falls below the threshold.

Threshold for an instance with 66 GB storage capacity:

5 + (1/25th of 66-GB capacity) = 5 + (66/25) = 5 + 2.6 -> 5 + 2 = 7 GB
Threshold for an instance with 130 GB storage capacity:
5 + (1/25th of 130-GB capacity) = 5 + (130/25) = 5 + (5.2) -> 5 + 5 = 10 GB
Threshold for an instance with 1000 GB storage capacity:
5 + (1/25th of 1000-GB capacity) = 5 + (1000/25) = 5 + 40 -> min(45, 25) = 25 GB
Automatic storage increase limit

If the automatic storage increase setting is enabled, this setting optionally imposes a limit on how large the storage for your instance can automatically grow. Because storage size cannot be decreased, this limit can prevent your instance from growing its storage size to an unnecessarily large size due to a temporary increase in traffic. Keep in mind, however, that when an instance stops being able to add storage that it needs, it is likely to stop accepting incoming connections, and could go offline.

Setting this limit to zero, the default value, means that there is no limit (other than the maximum available storage for the instance tier).

Backups and binary logging
These settings determine whether automated backups are performed and whether binary logging is enabled or not. Both options add a small performance cost, but are required for the creation of replicas and clones, and for point-in-time recovery.

For information about point-in-time recovery, see Overview of point-in-time recovery. For information about replication, see Replication Options. For information about cloning instances, see Cloning Instances.

Maintenance window

The day and hour when disruptive updates (updates that require an instance restart) to this Cloud SQL instance can be made. If the maintenance window is set for an instance, Cloud SQL does not initiate a disruptive update to that instance outside of the window. The update is not guaranteed to complete before the end of the maintenance window, but restarts typically complete within a couple of minutes.

If you do not specify a maintenance window, disruptive updates can happen at any time, although they generally only occur every few months.

Maintenance timing

This setting lets you provide a preference about the relative timing of instance updates that require a restart. Receiving updates earlier lets you test your application with an update before your instances that get the update later.

The relative timing of updates is not observed between projects; if you have instances with an earlier timing setting in a different project than your instances with a later timing setting, Cloud SQL makes no attempt to update the instances with the earlier timing setting first.

If you do not set the Maintenance timing setting, Cloud SQL chooses the timing of updates to your instance (within its Maintenance window, if applicable).

The Maintenance timing setting does not affect the software version Cloud SQL applies to your instance.

Authorized networks
You can add specific IP addresses or ranges of addresses to open your instance to those addresses. This is required if you do not use the Cloud SQL Proxy.

For information about configuring IP addresses, see Configuring IP connectivity.

For information about configuring the Cloud SQL Proxy, see Using the Proxy.

Activation policy
For Second Generation instances, the activation policy is used only to start or stop the instance. Setting the activation policy to ALWAYS starts the instance, and setting it to NEVER stops the instance and prevents further instance charges.
Cloud SQL flags
You can set specific Cloud SQL flags on the Cloud SQL instance.

For a complete list of the Cloud SQL flags you can set, see Configuring Cloud SQL Flags.

Settings for First Generation instances

Setting Modifiable after creation? Possible values
Instance ID N Composed of lowercase letters, numbers, and hyphens; must start with a letter.
Region N asia-east1 — Taiwan
europe-west1 — Belgium
us-central — Iowa
us-east1 — South Carolina
Tier Y D0
D1
D2
D4
D8
D16
D32
Database version N MySQL 5.5
MySQL 5.6 (default value)
Billing plan Y Per Use (default value)
Packages
Preferred location Y Follow App Engine app (default value)
Compute Engine zone
No preference
Backups and binary logging Y
(see note)
On or Off
Activation policy Y On Demand (default value)
Always On
Off
File system replication Y Synchronous (default value)
Asynchronous
IPv4 address Y Checkbox
Authorized networks Y IP addresses or ranges of addresses, in CIDR notation.
Authorized App Engine applications Y Application IDs
Cloud SQL flags Y See Configuring Cloud SQL Flags.
Instance ID
The instance ID is the name of the instance. It is used to uniquely identify your instance within the project. Choose an instance name that is aligned with the purpose of the instance when possible. Instance names must have 98 characters or less. However, if you add any read replicas to the instance, its full connection name (project name:instance name) must have no more than 39 characters. You do not need to prepend the project ID onto the instance ID. This is done automatically where appropriate (for example, in the log files).
Region
The Cloud Platform region where your instance is located. To improve performance, keep your data close to the services that need it. For more information, see Instance Locations.
Tier
Determines memory, virtual cores, and other resources available to your Cloud SQL instance. If possible, your largest table size should fit in memory. Your machine type affects the cost of your instance. For more information, see First Generation Pricing.
Billing plan
Determines how charges are calculated for your instance. Instances with the Per Use plan are charged only while the instance is running, whereas instances with the Packages plan are charged per hour. For more information, see First Generation Pricing. You can also see pricing for various scenarios with the Pricing Calculator.
Database version
Unless you need a capability provided only by a specific version, you should accept the default database version.
Preferred location
If you are using your Cloud SQL instance to provide data to an application running in App Engine or in a Compute Engine instance, you can use this field to tell Cloud SQL about the connection. If there is a zonal outage and your instance is failed over to another zone, Cloud SQL attempts to keep the instance close to its application. For more information about building applications to meet your latency, availability and durability requirements, see Geography and Regions.
Backups and binary logging
These settings determine whether backups are performed and whether binary logging is enabled or not. Both options add a small performance cost, but are required for the creation of replicas and clones, and for point-in-time recovery. For information about backups and point-in-time recovery, see Overview of point-in-time recovery. For information about replication, see Replication Options. For information about cloning instances, see Cloning Instances.
Activation policy
For First Generation instances with the Per Use billing plan, setting the activation policy to On Demand can reduce instance charges, depending on usage patterns. For more information about the activation policy, see the FAQ.
File system replication
You can choose the file system replication type for your instance. In most cases, the default value, Synchronous, is best. Asynchronous provides a slight performance gain, but if an outage occurs with this option set to Asynchronous, you can lose up to a few seconds of updates to your data.
File system replication is not the replication type used for data replication (read replicas or failover replicas).
IPv4 address
You can request an IPv4 address for your instance. IPv4 instances incur a small charge when the instance is not activated. If you can use IPv6, you can avoid the IPv4 charges. For information about configuring an IP address, see Configuring access for IP connections.
Authorized networks
You add specific IP addresses or ranges of addresses to enable applications or tools at those addresses to access the instance. For information about configuring IP addresses, see Configuring IP Access.
Authorized App Engine applications
You can authorize App Engine applications running in the standard environment to connect to the instance. By default, the App Engine application associated with the project is authorized to connect. For information about connecting from App Engine applications, see Connecting from App Engine Standard environment to First Generation.
Cloud SQL flags
You can set specific Cloud SQL flags on the Cloud SQL instance. For a complete list of the Cloud SQL flags you can set, see Configuring Cloud SQL Flags.

Impact of changing instance settings

For most instance settings, Google Cloud SQL applies the change immediately and connectivity to the instance is unaffected.

For First Generation instances, changing the instance size (tier) causes Google Cloud SQL to automatically restart the instance. This means that connections to the instance are dropped, and new connections cannot be made for the few moments that the instance is restarting. This is typically not a problem for applications designed to deal with temporary disruptions to database connectivity.

For Second Generation instances, changing either the machine type or the zone of the instance results in the instance going offline for several minutes. You should plan to make these kind of changes when your application can handle an outage of this length.

What's next

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud SQL for MySQL