This page provides information about the settings available for Cloud SQL instances.
| Setting | Modifiable after creation? | Possible values |
|---|---|---|
| Instance ID | N | Composed of lowercase letters, numbers, and hyphens; must start with a letter. The total length must be 98 characters or less. |
| Region | N | The instance's region. For a list of all available regions by Cloud SQL edition, see Region availability. |
| Zone | Y | The possible values depend on the region. |
| Database version | N |
For Cloud SQL Enterprise Plus edition, MySQL 8.0.31 and later:
Console string API enum string MySQL 8.4 (default) Console string API enum string MySQL 8.4 (default) |
| Automatic minor version upgrade | Y | Upgrades MySQL 8.0 instances automatically to the default minor version during scheduled maintenance updates. Available only for MySQL 8.0.35 and later. |
| SSL mode | Y | Enforces/enables SSL as follows:
|
| Server CA mode | Y | Lets you configure the server certificate authority (CA) for an instance. You can select one of the following available server CA options:
For more information, see Certificate authority (CA) hierarchies. |
| Automatic server certificate rotation | Y | To enable, set serverCertificationRotationMode to AUTOMATIC_ROTATION_DURING_MAINTENANCE. To disable, set
serverCertificationRotationMode to
NO_AUTOMATIC_ROTATION_DURING_MAINTENANCE.
|
| Set edition | Y |
|
| Set password policy | Y | Configured or not. |
| Private IP | After it's activated, it can't be deactivated. | Activated or deactivated. |
| Public IP | Y | Activated or deactivated. |
| Data Api Access | Y | Activated or deactivated. |
| Authorized networks | Y | If Public IP is enabled, IP addresses authorized to connect to the instance. You can also specify this value as an IP address range, in CIDR notation. |
| Private path for Google Cloud services | Y | Activated or deactivated. |
| Data API access | Y | Allowed or disallowed (default). |
| Data cache | Y | Activated (default) or deactivated. |
| Machine type | Y | Machine type is based on the machine series you select for your Cloud SQL instance. Select from C4A, N2, N4, general purpose shared core or general purpose dedicated core machine series. Learn more |
| Cores | Y |
For Cloud SQL Enterprise Plus edition: 2 to 128 (predefined machine types only) For Cloud SQL Enterprise edition: 1 to 96 (must be either 1 or an even number) Partial for shared vCPU |
| Memory | Y |
For Cloud SQL Enterprise Plus edition:
6.75 GB to 8 GB per vCPU. The 6.75 GB to 1 vCPU ratio is for the db-perf-optimized-N-128 machine type only. All other machine types have the 8 GB to 1 vCPU ratio.
For Cloud SQL Enterprise edition: 0.9 GB to 6.5 GB per vCPU (must be a multiple of 256 MB and at least 3.75 GB). |
| Storage type | N |
SSD (default value) HDD(Cloud SQL Enterprise edition only) Hyperdisk Balanced |
| Storage capacity | Y (Increase only) |
Standard and high memory machine types: up to 64 TB. Shared-core machine types ( db-f1-micro and db-g1-small):
up to 3054 GB.
Note that creating or increasing storage capacity to 64 TB might increase latency of common operations, such as backups, dependent on your workload. |
| Hyperdisk settings | Y |
This setting is only applicable for Cloud SQL Enterprise Plus edition instances using the
C4A or N4 machine series. Provisioned IOPS: 4,000 (default value) Provisioned throughput: 170 (default value) For more information about Hyperdisk settings, see Hyperdisk Balanced. |
| Enable automatic storage increases | Y |
On (default value) Off |
| Data encryption method | N |
Google-owned and Google-managed encryption key (default value) Cloud KMS key |
| Automatic storage increase limit | Y | In GBs. 0 (the default) means there is no limit. |
| Automated backups | Y (select a preferred 4-hour window, or Any (default)) |
On (default value) Off |
| Locations options | Y | Multi-region (default value) Region There is also a drop-down menu with a list of multi-regions when you select Multi-region or regions when you select Region. |
| Instance deletion protection | Y | Activated or deactivated. |
| Retain backups after instance deletion | Y | Activated or deactivated. |
| Take a final backup at instance deletion | Y | Activated or deactivated. |
| Set the retention period for a final backup | Y | The retention period for the final backup. This value can can be set to a maximum of 365 days. The default value is 30 days. |
| Enable point-in-time recovery (PITR) | Y (see note) |
On Off The default value varies by instance. For more information, see Use PITR. |
| Availability: Single zone | Y |
On (default value) Off |
| High availability (regional) | Y |
On Off (default value) |
| Maintenance: Maintenance window | Y |
Any (default value) Day of the week and hour of the day |
| Maintenance: Maintenance timing | Y |
Any (default value) Canary (also Week 1 (was Earlier) / Preview) Stable (also Week 2 (was Later) / Production) Week 5 |
| Database flags | Y | See Configuring Database Flags. |
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.
The total length of project-ID:instance-ID must be 98
characters or less.
Determines memory and virtual cores available for your Cloud SQL instance. Machine types are part of a machine series, and machine series availability is determined by your Cloud SQL edition.
For Cloud SQL Enterprise Plus edition instances, Cloud SQL
offers predefined machine types for your instances in
the N2 and C4A
machine series.
For Cloud SQL Enterprise edition instances, Cloud SQL offers the
general purpose shared core, general purpose dedicated core,
and the N4 machine series.
If you require real-time processing, such as online transaction processing (OLTP), make sure that your instance has enough memory to contain the entire working set. However, there are other factors that can impact memory requirements, such as number of active connections, and internal overhead processes. Perform load testing to avoid performance issues in your production environment.
When you configure your instance, select sufficient memory and vCPUs to handle your needs, and scale up your instance as your requirements increase. A machine configuration with insufficient vCPUs might lose its SLA coverage. For more information, see Operational guidelines.
To learn more about the machine types and machine series available for your Cloud SQL instance, see Machine series overview.
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.
gcloud command and
REST API usage, see
the reference documentation.
Storage type is determined by the machine type you select for your instance. Each machine type belongs to a specific machine series, and each machine series offers different storage type options.
Storage type by Cloud SQL editions and machine series:
For N2 machine series, choosing SSD, the default
value, provides your instance with SSD storage. SSDs provide lower latency
and higher data throughput. If you don't 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.
For the C4A and N4 machine series, choosing Hyperdisk Balanced, the default and only value, provides a scalable, high-performance storage service. To learn more about Hyperdisk Balanced and its limitations, see Storage options overview.
The password policy for the instance. It includes the following options:
The number of CPUs for your instance. You can also choose to create an instance with less than one CPU (a shared code instance, or shared vCPU).
The amount of memory available for your instance. For performance-sensitive workloads such as online transaction processing (OLTP), make sure that your instance has enough memory to contain the entire working set. However, there are other factors that can impact memory requirements, such as number of active connections. Perform load testing to avoid performance issues in production.
(Optional) The SSL/TLS options for a database connection.
Cloud SQL uses SSL/TLS to establish secure, authenticated, and encrypted
connections to instances. You can use the SSL mode setting
sslModeto enforce all
database connections to an instance to use SSL/TLS encryption.
You can also use this setting to enforce verification of client
certificates. This setting gives you more granular
controls over your SSL connections compared to
requireSsl. We recommend that you use sslMode.
For more information,
see IpConfiguration.
You can enforce SSL when you create an instance or update it for any
existing instance.
(Optional) When you create an instance, you can select the server CA mode for the instance.
GOOGLE_MANAGED_INTERNAL_CA: this is the default value.
Cloud SQL creates a new self-signed server CA for each
instance.GOOGLE_MANAGED_CAS_CA: the instance uses a server CA
hierarchy hosted by Certificate Authority Service and the issuing CAs are shared across all
instances in the same region.
Supported only on MySQL 8.0.30 and later.
CUSTOMER_MANAGED_CAS_CA: the instance uses a server CA
that you create from a CA pool. With this option, you manage the
CA hierarchy and the rotation of CA certificates.
Supported only on MySQL 8.0.30 and later.
For more information about these options, see Certificate authority (CA) hierarchies.
Choose whether to enable automatic server certificate rotation for the instance. Automatically rotates the server certificate for your instance during your regularly scheduled maintenance update or when you perform self-service maintenance up to 180 days before the certificate expires. By default, this option is disabled.
This feature is available only for instances that are configured
with serverCaMode as
GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA
only.
For more information about rotating Cloud SQL server certificates automatically, see Enable automatic server certificate rotation.
Choose a capacity to fit your database size. After you have created your instance, you can manually increase the storage capacity by editing your instance configuration, but you cannot decrease it. Increasing the storage capacity does not cause downtime.
The amount of storage capacity allocated for your instance affects the cost of your instance. For more information, see Storage and Networking Pricing.
For read replicas, the storage capacity must always be at least as high as the storage capacity of the primary instance. When a primary instance is resized, all read replicas are resized, if needed, so that they have at least as much storage capacity as the updated primary instance.
If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity. If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 64 TB.
The automatic storage increase setting of a primary instance automatically applies to any read replicas of that instance. The automatic storage increase setting cannot be independently set for read replicas.
The threshold size depends on the amount of storage currently provisioned for your instance:
Hyperdisk Balanced
MAX(5, (provisioned storage) * 5 / 100)
The threshold size is rounded up to the nearest whole number.
MAX(5, (66 * 0.05)) = MAX(5, 3.3) = 5 GB
SSD or HDD
MIN(5 + (provisioned storage)/25, 25)
The threshold size is rounded down to the nearest whole number.
MIN(5 + (66/25), 25) = MIN(5 + 2.6, 25) = MIN(7, 25) = 7 GB
For Hyperdisk Balanced, the amount of storage added is 15% of the current provisioned storage, but can't be smaller than 5 GB. This can be calculated using the following:
MAX(5, (provisioned storage) * 15 / 100)
The threshold size is rounded down to the nearest whole number.
For all other storage types, including SSD and HDD, the amount of storage added to the instance is equal to the threshold size, which cannot be larger than 25 GB.
For Hyperdisk Balanced, instances provisioned with storage of more than 100 GB have a minimum possible empty space of 5% of the provisioned capacity.
For all other storage types and instances provisioned with storage of 500 GB or more, the threshold size is always 25 GB and the amount of storage added is always 25 GB. As a result, the maximum possible empty space is 50 GB. If you don't manually resize the instance with disk space that's greater than 5 TB, then the disk can remain at 99% capacity even though the instance has empty space.
Before an operation that rapidly grows disk space usage, such as a large import or a query that requires a large temp table, manually resize the disk, rather than depend on automatic storage increase to keep up. For Hyperdisk Balanced, storage increases that happen too frequently in a short timespan (4 hours), these increases might be subject to throttling. This might result in an instance running out of available space even though automatic storage increases are enabled and the storage size is below the automatic storage increase limit.
The file system uses some space internally for file system metadata.
This space isn't included in the disk usage metric
(database/disk/bytes_used).
For large disks, the reserved space can take 1% to 3% of total disk size,
so you might see the
automatic storage increase occur before the disk usage reaches the threshold.
By default, your Cloud SQL instance is encrypted with a Google-owned and managed key. If you want to control this key, then use a customer-managed encryption key (CMEK) in Cloud Key Management Service (KMS). Cloud KMS integrates with Cloud SQL.
Using Cloud KMS keys gives you control over their protection level, location, rotation schedule, usage and access permissions. In addition, you can use various encryption keys across resources. Using Cloud KMS also lets you track key usage, view audit logs, and control key life cycles.
Instead of Google owning and managing the keys that protect your data, you control and manage these keys in Cloud KMS.
For more information about CMEKs, see About customer-managed encryption keys (CMEKs).
If you enable the automatic storage increase setting, you can provide a specific limit on how large the storage for your instance can automatically grow. Keep in mind that the bigger the size of the instance, the greater the operational latency.
You can't decrease storage size, so this limit can prevent your instance size from growing too large (due to a temporary increase in traffic). Keep in mind that when an instance becomes unable to add storage that it needs, the instance likely stops 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).
To set the limit when you create the instance, use the
--storage-auto-increase-limit=INTEGER_VALUE_OF_GB
parameter, as described on the create instance
page. To set the limit on an existing instance, use the same parameter with the
gcloud sql instances patch command.
The automatic storage increase limit setting of a primary instance automatically applies to any read replicas of that instance. The automatic storage increase limit setting cannot be independently set for read replicas.
These options determine if automated backups are performed and if binary logging is enabled. Both options add a small performance cost and use additional storage, but are required for the creation of replicas and clones, and for point-in-time recovery. When you select this option, you can also select a timeframe when automated backups occur.
Automated backups happen daily, during the time window you choose. At the end of seven days, the oldest backup is deleted.
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.
The default value for the number of retained backups is 7 but you can change it to any value in the range of 1 to 365.
See Automated backup and transaction log retention for more information.
You can choose to store backups in multiple or single regions. Multi-region is the default, and the recommended choice because it provides protection against downtime when a region becomes unavailable. Backups are stored in regions that are closest to the instance.
You also have the option of selecting a custom location for your backup. Only use this option if required by regulation or if an organization policy requires your backups to be in specific multiple or single regions. See Custom locations for more information.
Protects an instance against accidental deletion. If this setting is enabled, you must deactivate it before deleting the instance. See Prevent deletion of an instance.
Retains on-demand and automated backups for an instance after the instance is deleted. For more information about this setting, see Retained backups.
Takes a final backup of an instance at time of instance deletion. Use final-backup-retention-days to set the retention period for the final backup. If no retention
period is set, then the retention period is set to
default, which is 30 days.
For more information about this setting, see
Take a final backup before instance deletion.
Sets the retention period for the final backup. The retention period can
be set to a maximum of 365 days. If the
final-backup-retention-days value isn't set when you enable
final-backup, then the default retention period of 30 days is
used. For more information about this setting, see
Take a final backup before instance deletion.
Point-in-time recovery lets you recover from a backup, starting from a specific point in time.
For information about point-in-time recovery, see Overview of point-in-time recovery.
Puts your instance and backups in a single zone. When you select this option, there is no failover in the event of an outage. Recommended only for test and development purposes.
When you select High availability (regional), if there is an outage, your instance fails over to another zone in the region where your instance is located, as long as the failover zone is not having an outage. It is recommended that you select High availability (regional) for instances in your production environment.
The day and hour that your maintenance events for the Cloud SQL instance are scheduled. For Cloud SQL Enterprise Plus edition primary instances, the maintenance downtime is typically less than 1 second. For all other instances, maintenance downtime is typically 60 seconds or less on average.
Read replicas do not support maintenance window settings at this time.
For more information about maintenance, see About maintenance on Cloud SQL instances.
Your preference about the relative timing of maintenance updates.
You can receive your updates one or two weeks after the notification and
test your maintenance updates in a test environment before your production
instances get the update. You can also choose to receive the maintenance
update five weeks ("week5") after the notification is sent out.
The maintenance timing setting doesn't affect the maintenance version that
Cloud SQL applies to your instance.
If you don't set the maintenance timing setting, Cloud SQL chooses the timing of updates to your instance (within its maintenance window, if applicable).
For more information about maintenance, see About maintenance on Cloud SQL instances.
executeSql
to execute statements on the instance. This setting is deactivated by default.
For information about configuring IP addresses, see Configuring IP connectivity.
This configuration setting lets other Google Cloud services, such as BigQuery, access data in Cloud SQL and make queries against this data over a private connection. The configuration is available only when you configure your instance to use a private IP address, and you configure an authorized network to create a private connection.
In the Google Cloud console, configure a private path by selecting the
Enable private path checkbox. For the gcloud CLI, use the
--enable-google-private-path flag when you create the instance.
This setting controls connectivity to the instance using Data API. It's disallowed by default. When allowed, authorized users can use Data API to connect to the instance. For instances with Private IP only, it allows authorized users to connect from the public internet.
In the Google Cloud console, configure Data API access by selecting the
Allow Data API checkbox. For the gcloud CLI, use the
--data-api-access=ALLOW_DATA_API flag when you create the instance.
Data cache is enabled automatically for Cloud SQL for MySQL Enterprise Plus edition instances. Data cache utilizes local SSDs to extend a buffer pool from memory to the SSD tier. Cloud SQL manages this setting. Caching your entire working set provides maximum performance when using data cache. You can use the Google Cloud console, gcloud CLI, or Cloud SQL Admin API to turn this setting on or off for your Cloud SQL for MySQL Enterprise Plus edition instances.
You can set specific database flags on the Cloud SQL instance.
For a complete list of the database flags you can set, see Configure Database Flags.
For most instance settings, Cloud SQL applies the change immediately and connectivity to the instance is unaffected.
For MySQL instances, changing either the machine type or the zone of the instance results in the instance going offline for several minutes. Plan to make these kinds of changes when your application can handle an outage of this length.
If you're using Cloud SQL Enterprise Plus edition, then you can make some instance setting changes, such as scale up vCPUs or enable or disable data cache, with near-zero downtime. For more information, see Availability in Cloud SQL.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-07-22 UTC.