Configure database flags

MySQL  |  PostgreSQL  |  SQL Server

This page describes how to configure database flags for Cloud SQL, andlists the flags that you can set for your instance. You use database flagsfor many operations, including adjusting MySQL parameters, adjustingoptions, and configuring and tuning an instance.

Note: Some database flag settings can affect instance availability orstability, and remove the instance from theCloud SQL SLA. Forinformation about these flags, seeOperational Guidelines.

In some cases, settingone flag may require that you set another flag to fully enable thefunctionality you want to use. For example, to enableslow query logging,you must set both theslow_query_log flag toon and thelog_output flagtoFILE to make your logs available using the Google Cloud console Logs Explorer.

When you set, remove, or modify a flag for a database instance, the databasemight be restarted. The flag value is then persisted for the instance until youremove it. If the instance is the source of a replica, and the instance isrestarted, the replica is also restarted to align with the current configurationof the instance.

Configure database flags

The following sections cover common flag management tasks.

Set a database flag

Console

  1. In theGoogle Cloud console,select the project that contains the Cloud SQL instance for which you want to set a database flag.
  2. Open the instance and clickEdit.
  3. Go to theFlags section.
  4. To set a flag that has not been set on the instance before, clickAdd item, choose the flag from the drop-down menu, and set its value.
  5. ClickSave to save your changes.
  6. Confirm your changes underFlags on the Overview page.

gcloud

Edit the instance:

gcloudsqlinstancespatchINSTANCE_NAME--database-flags=FLAG1=VALUE1,FLAG2=VALUE2

This command will overwrite all database flagspreviously set. To keep those and add new ones, include the values for allflags you want set on the instance; any flag not specifically included isset to its default value. For flags that don't take a value, specify theflag name followed by an equals sign ("=").

For example, to set thegeneral_log,skip_show_database, andwait_timeout flags, youcan use the following command:

gcloudsqlinstancespatchINSTANCE_NAME\--database-flags=general_log=on,skip_show_database=on,wait_timeout=200000

Terraform

To add database flags, use aTerraform resource.

resource "google_sql_database_instance" "instance" {  database_version = "MYSQL_8_0"  name             = "mysql-instance"  region           = "us-central1"  settings {    database_flags {      name  = "general_log"      value = "on"    }    database_flags {      name  = "skip_show_database"      value = "on"    }    database_flags {      name  = "wait_timeout"      value = "200000"    }    disk_type = "PD_SSD"    tier      = "db-n1-standard-2"  }  # set `deletion_protection` to true, will ensure that one cannot accidentally delete this instance by  # use of Terraform whereas `deletion_protection_enabled` flag protects this instance at the GCP level.  deletion_protection = false}

Apply the changes

To apply your Terraform configuration in a Google Cloud project, complete the steps in the following sections.

Prepare Cloud Shell

  1. LaunchCloud Shell.
  2. Set the default Google Cloud project where you want to apply your Terraform configurations.

    You only need to run this command once per project, and you can run it in any directory.

    export GOOGLE_CLOUD_PROJECT=PROJECT_ID

    Environment variables are overridden if you set explicit values in the Terraform configuration file.

Prepare the directory

Each Terraform configuration file must have its own directory (alsocalled aroot module).

  1. InCloud Shell, create a directory and a new file within that directory. The filename must have the.tf extension—for examplemain.tf. In this tutorial, the file is referred to asmain.tf.
    mkdirDIRECTORY && cdDIRECTORY && touch main.tf
  2. If you are following a tutorial, you can copy the sample code in each section or step.

    Copy the sample code into the newly createdmain.tf.

    Optionally, copy the code from GitHub. This is recommended when the Terraform snippet is part of an end-to-end solution.

  3. Review and modify the sample parameters to apply to your environment.
  4. Save your changes.
  5. Initialize Terraform. You only need to do this once per directory.
    terraform init

    Optionally, to use the latest Google provider version, include the-upgrade option:

    terraform init -upgrade

Apply the changes

  1. Review the configuration and verify that the resources that Terraform is going to create or update match your expectations:
    terraform plan

    Make corrections to the configuration as necessary.

  2. Apply the Terraform configuration by running the following command and enteringyes at the prompt:
    terraform apply

    Wait until Terraform displays the "Apply complete!" message.

  3. Open your Google Cloud project to view the results. In the Google Cloud console, navigate to your resources in the UI to make sure that Terraform has created or updated them.
Note: Terraform samples typically assume that the required APIs are enabled in your Google Cloud project.

Delete the changes

To delete your changes, do the following:

  1. To disable deletion protection, in your Terraform configuration file set thedeletion_protection argument tofalse.
    deletion_protection =  "false"
  2. Apply the updated Terraform configuration by running the following command and enteringyes at the prompt:
    terraform apply
  1. Remove resources previously applied with your Terraform configuration by running the following command and enteringyes at the prompt:

    terraform destroy

REST v1

To set a flag for an existing database:

Before using any of the request data, make the following replacements:

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id

Request JSON body:

{  "settings":  {    "databaseFlags":    [      {        "name": "flag_name",        "value": "flag_value"      }    ]  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-21T22:43:37.981Z",  "operationType": "UPDATE",  "name": "operation-id",  "targetId": "instance-id",  "selfLink": "https://sqladmin.googleapis.com/v1/projects/project-id/operations/operation-id",  "targetProject": "project-id"}

For example, to set thegeneral_log flag for an existingdatabase use:

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id

Request JSON body:

{  "settings":  {    "databaseFlags":    [      {        "name": "general_log",        "value": "on"      }    ]  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-21T22:43:37.981Z",  "operationType": "UPDATE",  "name": "operation-id",  "targetId": "instance-id",  "selfLink": "https://sqladmin.googleapis.com/v1/projects/project-id/operations/operation-id",  "targetProject": "project-id"}

If there are existing flags configured for the database, modify the previouscommand to include them. ThePATCH command overwrites the existingflags with the ones specified in the request.

REST v1beta4

To set a flag for an existing database:

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id

Request JSON body:

{  "settings":  {    "databaseFlags":    [      {        "name": "flag_name",        "value": "flag_value"      }    ]  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-21T22:43:37.981Z",  "operationType": "UPDATE",  "name": "operation-id",  "targetId": "instance-id",  "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/operations/operation-id",  "targetProject": "project-id"}

For example, to set thegeneral_log flag for an existingdatabase use:

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id

Request JSON body:

{  "settings":  {    "databaseFlags":    [      {        "name": "general_log",        "value": "on"      }    ]  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-21T22:43:37.981Z",  "operationType": "UPDATE",  "name": "operation-id",  "targetId": "instance-id",  "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/operations/operation-id",  "targetProject": "project-id"}

If there are existing flags configured for the database, modify the previouscommand to include them. ThePATCH command overwrites the existingflags with the ones specified in the request.

Clear all flags to their default values

Console

  1. In theGoogle Cloud console,select the project that contains the Cloud SQL instance for which you want to clear all flags.
  2. Open the instance and clickEdit.
  3. Open theDatabase flags section.
  4. Click theX next to all of the flags shown.
  5. ClickSave to save your changes.

gcloud

Clear all flags to their default values on an instance:

gcloudsqlinstancespatchINSTANCE_NAME\--clear-database-flags

You are prompted to confirm that the instance will be restarted.

REST v1

To clear all flags for an existing instance:

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id

Request JSON body:

{  "settings":  {    "databaseFlags": []  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-21T22:43:37.981Z",  "operationType": "UPDATE",  "name": "operation-id",  "targetId": "instance-id",  "selfLink": "https://sqladmin.googleapis.com/v1/projects/project-id/operations/operation-id",  "targetProject": "project-id"}

REST v1beta4

To clear all flags for an existing instance:

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id

Request JSON body:

{  "settings":  {    "databaseFlags": []  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-21T22:43:37.981Z",  "operationType": "UPDATE",  "name": "operation-id",  "targetId": "instance-id",  "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/operations/operation-id",  "targetProject": "project-id"}

View current values of database flags

To view all current values of the MySQL system variables, log intoyour instance with themysql client and enter the following statement:

SHOWVARIABLES;

Note that you can change the value only for supported flags (as listed below).

Determine which database flags have been set for an instance

To see which flags have been set for a Cloud SQL instance:

Console

  1. In theGoogle Cloud console,select the project that contains the Cloud SQL instance for which you want to see the database flags that have been set.
  2. Select the instance to open itsInstance Overview page.

    The database flags that have been set are listed under theDatabase flags section.

gcloud

Get the instance state:

gcloudsqlinstancesdescribeINSTANCE_NAME

In the output, database flags are listed under thesettings asthe collectiondatabaseFlags. For more information about the representation of the flags in the output, seeInstances Resource Representation.

REST v1

To list flags configured for an instance:

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

GET https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "settings":  {    "authorizedGaeApplications": [],    "tier": "machine-type",    "kind": "sql#settings",    "availabilityType": "REGIONAL",    "pricingPlan": "PER_USE",    "replicationType": "SYNCHRONOUS",    "activationPolicy": "ALWAYS",    "ipConfiguration":    {      "privateNetwork": "projects/project-id/global/networks/default",      "authorizedNetworks": [],      "ipv4Enabled": false    },    "locationPreference":    {      "zone": "zone",      "kind": "sql#locationPreference"    },    "databaseFlags": [      {        "name": "general_log",        "value": "on"      }    ],    "dataDiskType": "PD_SSD",    "maintenanceWindow":    {      "kind": "sql#maintenanceWindow",      "hour": 0,      "day": 0    },    "backupConfiguration":    {      "startTime": "03:00",      "kind": "sql#backupConfiguration",      "enabled": true,      "binaryLogEnabled": true    },    "settingsVersion": "54",    "storageAutoResizeLimit": "0",    "storageAutoResize": true,    "dataDiskSizeGb": "10"  }}

In the output, look for thedatabaseFlags field.

REST v1beta4

To list flags configured for an instance:

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

GET https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "settings":  {    "authorizedGaeApplications": [],    "tier": "machine-type",    "kind": "sql#settings",    "availabilityType": "REGIONAL",    "pricingPlan": "PER_USE",    "replicationType": "SYNCHRONOUS",    "activationPolicy": "ALWAYS",    "ipConfiguration":    {      "privateNetwork": "projects/project-id/global/networks/default",      "authorizedNetworks": [],      "ipv4Enabled": false    },    "locationPreference":    {      "zone": "zone",      "kind": "sql#locationPreference"    },    "databaseFlags": [      {        "name": "general_log",        "value": "on"      }    ],    "dataDiskType": "PD_SSD",    "maintenanceWindow":    {      "kind": "sql#maintenanceWindow",      "hour": 0,      "day": 0    },    "backupConfiguration":    {      "startTime": "03:00",      "kind": "sql#backupConfiguration",      "enabled": true,      "binaryLogEnabled": true    },    "settingsVersion": "54",    "storageAutoResizeLimit": "0",    "storageAutoResize": true,    "dataDiskSizeGb": "10"  }}

In the output, look for thedatabaseFlags field.

Flags managed by Cloud SQL

Cloud SQL adjusts certain system flags depending on the instance machinetype.

innodb_buffer_pool_instances
  • 1 for db-f1-micro and db-g1-small.
  • 1 if RAM< 7.5 GB.
  • 2 if 7.5 GB<= RAM< 13 GB.
  • 4 if 13 GB<= RAM< 26 GB.
  • 8 if RAM >= 26 GB.

Supported flags

The flags supported in Cloud SQL are the most commonly requested flags forMySQL. Flags not mentioned below are not supported.

For a given flag, Cloud SQL might support a different value or rangefrom the corresponding MySQL parameter or option.

The flags apply to all versions of MySQL supported by Cloud SQLexcept where noted.

A |B |C |D |E |F |G |H |I |L |M |N |O |P |Q |R |S |T |U |W

For more information about this flag, see theTips section.

Cloud SQL FlagType
Acceptable Values and Notes
Restart
Required?
activate_all_roles_on_loginboolean
on |off
default:off
Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
autocommitboolean
on |off
default:on
No
auto_increment_incrementinteger
1 ... 65535
No
auto_increment_offsetinteger
1 ... 65535
No
automatic_sp_privilegesboolean
on |off
default:on
No
back_loginteger
1 ... 65535
default:max_connections
Note: Themax_connections flag enables the permitted backlog to adjust to the maximum permitted number of simultaneous client connections.
Yes
binlog_cache_sizeinteger
4096 ... 9223372036854775807
No
binlog_expire_logs_secondsinteger
0 or86400 (1 day) ...4294967295 (max value)
Default is 86400, which equals 1 day.

See theTips section for more information about this flag.

No
binlog_group_commit_sync_delay0 ... 1000000

Supported in MySQL 5.7 and later

Default is0.

No
binlog_group_commit_sync_no_delay_count0 ... 1000000

Supported in MySQL 5.7 and later

Default is0.

No
binlog_gtid_simple_recoveryboolean
on |off
default:on
Yes
binlog_order_commitsboolean
on |off
default:on

See theTips section for more information about this flag.

No
binlog_row_imageenumeration
full (default),minimal, ornoblob
No
binlog_row_metadataenumeration
full orminimal (default)
No
binlog_row_value_optionsstring
PARTIAL_JSON
No
binlog_rows_query_log_eventsboolean
on |off
default:off
No
binlog_stmt_cache_size4096 ... 9223372036854775807No
binlog_transaction_dependency_history_sizeinteger

For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

No
binlog_transaction_dependency_trackingenumeration

For information about how to use this flag and its acceptable values, seeConfiguring parallel replication. This flag is not supported in MySQL 8.4.

No
block_encryption_modestring
aes-keylen-mode
default:aes-128-ECB

Note: This flag takes a value inaes-keylen-mode format, wherekeylen is the key length (in bits) andmode is the encryption mode. The value isn't case-sensitive.

Allowedkeylen values are128,192, and256.

Allowedmode values areECB,CBC,CFB1,CFB8,CFB128, andOFB.

No
bulk_insert_buffer_sizeinteger
0 ... 4294967295
default:8388608
No
collation_connectionstring
default:
MySQL 8.0 and later -utf8mb4_0900_ai_ci

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
collation_serverstring
default:
MySQL 5.7 -utf8_general_ci
MySQL 8.0 and later -utf8mb4_0900_ai_ci
Note: Thecollation_server flag should always be set to a value that is compatible with thecharacter_set_server.
No
character_set_clientstring

default:
MySQL 5.7:utf8
MySQL 8.0 and later:utf8mb4

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
character_set_connectionstring
default:
MySQL 5.7:utf8
MySQL 8.0 and later:utf8mb4

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
character_set_resultsstring
utf8 orutf8mb4
default:
MySQL 5.7:utf8
MySQL 8.0 and later:utf8mb4

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
character_set_serverstring
utf8 orutf8mb4 (recommended)
Yes
check_proxy_usersboolean
on |off
default:off
No
cloudsql_allow_analyze_tablebooleanon |off
default:off
Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
cloudsql_avoid_parse_session_loggingbooleanon |off
default:off
No
cloudsql_iam_authenticationbooleanon |off
default:off
Supported in MySQL 5.7 and later for Cloud SQL.
No
cloudsql_ignore_innodb_encryptionbooleanon |off
default:off
Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
cloudsql_mysql_audit_data_masking_cmdsstring
"",dql,dml,ddl,dcl,show,call,create_udf,drop_function,create_procedure,create_function,drop_procedure,alter_procedure,alter_function,create_trigger,drop_trigger,create_event,alter_event,drop_event,create_db,drop_db,alter_db,create_user,drop_user,rename_user,alter_user,create_table,create_index,alter_table,drop_table,drop_index,create_view,drop_view,rename_table,update,insert,insert_select,delete,truncate,replace,replace_select,delete_multi,update_multi,load,select,call_procedure,connect,disconnect,grant,revoke,revoke_all,show_triggers,show_create_proc,show_create_func,show_procedure_code,show_function_code,show_create_event,show_events,show_create_trigger,show_grants,show_binlog_events,show_relaylog_events

default:create_user,alter_user,grant, andupdate
No
cloudsql_mysql_audit_data_masking_regexstring
max_string_length: 2048
default: Clickhere.
No
cloudsql_mysql_audit_log_write_periodinteger
0...5000 milliseconds
default:500 milliseconds
No
cloudsql_mysql_audit_max_query_lengthinteger
-1...1073741824
default:-1
No
cloudsql_vectorbooleanon |off
default:off
Note: The flag is supported in MySQL 8.0.36 and later for Cloud SQL.
Yes
cloudsql_vector_iterative_filteringboolean

default:off
Note: The flag is supported in MySQL 8.0.36 and later for Cloud SQL.
No
cloudsql_vector_iterative_filtering_max_neighborsinteger
10...1000
default:500
Note: The flag is supported in MySQL 8.0.36 and later for Cloud SQL.
No
cloudsql_vector_max_mem_sizeinteger
1073741824...innodb_buffer_pool_size/2
default:1073741824 in bytes
Note: The flag is supported in MySQL 8.0.36 and later for Cloud SQL.
Yes
completion_typeenumeration
NO_CHAIN (default),CHAIN, orRELEASE
No
concurrent_insertenumeration
NEVER,AUTO (default), orALWAYS
No
connect_timeoutinteger
2 ...31536000
default:10
No
connection_memory_chunk_sizeinteger
0 ...536870912
Default:
MySQL 8.0.28 to 8.0.33:8912
MySQL 8.0.34 and later:8192
Note: The flag is supported in MySQL 8.0.28 and later for Cloud SQL.
No
connection_memory_limitinteger
2097152 ...9223372036854775807
Note: The flag is supported in MySQL 8.0.28 and later for Cloud SQL.
No
cte_max_recursion_depthinteger
0 ...4294967295
default:1000
No
default_authentication_pluginstring
mysql_native_password|caching_sha2_password
Note: This flag is supported in MySQL 8.0 for Cloud SQL only. The flag is not supported in MySQL 8.4.
Yes
default_password_lifetimeinteger0...65535
default:0
Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
default_time_zonestring
There are two ways to specify timezones: as timezone offsets and timezone names. For example,+00:00 is the timezone offset for London (which is in the UTC timezone), andEurope/London is its timezone name.

You use values to specify timezone offsets, from-12:59 to+13:00. Leading zeros are required.

When using timezone names, automatic adjustment to daylight saving time is supported. When using timezone offsets, it isn't supported. See a list oftimezone names that Cloud SQL for MySQL supports. You must update this flag manually, on the primary instance and on all read replicas, to account for it.

To set the timezone without causing a restart of the Cloud SQL instance, use theset time_zone=timezone_offset ortimezone_name command with theinit_connect flag.

Yes
default_tmp_storage_enginestring
INNODB|MEMORY
default:INNODB
No
default_week_formatinteger
0 ...7
default:0
No
delay_key_writeenumeration
OFF,ON (default), orALL
No
disconnect_on_expired_passwordbooleanon |off
default:on
Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
Yes
div_precision_incrementinteger
0 ...30
default:4
No
end_markers_in_jsonboolean
on |off
default:off
No
eq_range_index_dive_limitinteger
0 ... 2147483647
No
event_schedulerboolean
on |off

If you are using the Event Scheduler, configure your instance with an activation policy of ALWAYS to ensure that scheduled events run.

See theTips section for more information about this flag.

No
expire_logs_daysinteger
0 ...99
Default is 0, which means no automatic removal.

Note: This flag is not supported in MySQL 8.4. Usebinlog_expire_logs_seconds instead. See theTips section for more information about this flag.

No
explicit_defaults_for_timestampboolean
on |off

Note: The flag only requires a restart for MySQL 5.6.x or earlier.
No
flush_timeinteger
0 ...31536000
default:0
No
foreign_key_checksboolean
on |off
default:on

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
ft_max_word_leninteger
10 ... 252
Yes
ft_min_word_leninteger
1 ... 16
Yes
ft_query_expansion_limitinteger
0 ... 1000
Yes
ft_stopword_filestring
Yes
general_logboolean
on |off

See theTips section for more information about general logs.

No
generated_random_password_lengthinteger 5-255
default:20
Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
global_connection_memory_limitinteger
16777216 ... 9223372036854775807
Note: The flag is supported in MySQL 8.0.28 and later for Cloud SQL.
No
global_connection_memory_trackingboolean
on |off
Default:off
Note: The flag is supported in MySQL 8.0.28 and later for Cloud SQL.
No
group_concat_max_leninteger
4 ... 17179869184
No
gtid_executed_compression_periodinteger
0 ...4294967295
default (up to version 8.0.22):1000
default (version 8.0.23+):0
No
histogram_generation_max_mem_sizeinteger
1000000 ...4294967295
default:20000000
No
init_connectstringNo
innodb_adaptive_hash_indexboolean
on |off
No
innodb_adaptive_hash_index_partsinteger
1 ... 512
Yes
innodb_adaptive_max_sleep_delayinteger
0 ... 1000000
No
innodb_autoextend_incrementinteger
1 ...1000
No
innodb_autoinc_lock_modeinteger
0 ... 2
Yes
innodb_buffer_pool_chunk_sizeinteger
1048576 ...(innodb_buffer_pool_size/innodb_buffer_pool_instances)

This flag value is dependent oninnodb_buffer_pool_size andinnodb_buffer_pool_instances. MySQL can auto-tune the value ofinnodb_buffer_pool_chunk_size based on these two flags.

Yes
innodb_buffer_pool_dump_pctinteger
1 ... 100
Default:25
No
innodb_buffer_pool_dump_at_shutdownboolean
on |off
No
innodb_buffer_pool_dump_nowboolean
on |off

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
innodb_buffer_pool_instancesinteger
1 ... 64
Yes
innodb_buffer_pool_load_abortboolean
on |off

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
innodb_buffer_pool_load_at_startupboolean
on |off
Yes
innodb_buffer_pool_load_nowboolean
on |off

See theTips section for more information about this flag.

Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
No
innodb_buffer_pool_sizeinteger

Setting this flag for MySQL 5.6 requires a restart. See theTips section for more information about this flag.

No
innodb_change_buffer_max_sizeinteger
0 ... 50
No
innodb_change_bufferingstring

Options:none,inserts,deletes,changes,purges,all.

No
innodb_checksum_algorithmstring

Options:crc32,strict_crc32,innodb,strict_innod,none,strict_none.

No
innodb_cloudsql_managed_buffer_poolboolean
on |off
Default:off
(Preview)
No
innodb_cloudsql_managed_buffer_pool_threshold_pctinteger
50 ...99
Default:95
(Preview)
No
innodb_cloudsql_optimized_writeboolean

This flag is available only for instances with Cloud SQL Enterprise Plus edition. For more information about this flag, see theTips section.

Yes
innodb_cmp_per_index_enabledboolean
on |off
No
innodb_commit_concurrencyinteger
0 ...1000
Yes
innodb_compression_failure_threshold_pctinteger
0 ...100
No
innodb_compression_levelinteger
0 ...9
No
innodb_compression_pad_pct_maxinteger
0 ...75
No
innodb_concurrency_ticketsinteger
1 ... 4294967295
No
innodb_deadlock_detectboolean
on |off

Supported in MySQL5.7 and later.

Default:on

No
innodb_disable_sort_file_cacheboolean
on |off
No
innodb_doublewrite_batch_sizeinteger
0 ... 256
Default:0
Yes
innodb_doublewrite_filesinteger
2 ... 128
Yes
innodb_doublewrite_pagesinteger
4 ... 512
Default:64
Yes
innodb_file_per_tableboolean
on |off

See theTips section for more information about this flag.

No
innodb_fill_factorinteger
10 ... 100
No
innodb_flush_log_at_timeoutdouble
0.0001...2700
Default:1

Supported in MySQL5.7 and later.

See theTips section for more information about this flag.

No
innodb_flush_log_at_trx_commitinteger
1, 2
Default:1

If you promote a replica with this flag enabled, the flag is automatically removed causing the promoted replica to have full durability by default. To use this flag with a promoted replica, you can update the flag to the replica after promotion.

Note:If you change the default value for theinnodb_flush_log_at_trx_commit flag on an HA-enabled instance, then the instance loses SLA coverage because durability might decrease.

See theTips section for more information about this flag.

No
innodb_flush_methodstring

Options:fsync,O_DIRECT,O_DSYNC

Default:O_DIRECT
Yes
innodb_flush_neighborsenumeration
0 ...2
Default values:
  • MySQL 5.6: 0
  • MySQL 5.7 and later: 2
  • No
    innodb_flush_syncboolean
    on |off
    No
    innodb_flushing_avg_loopsinteger
    1 ... 1000
    Default:30
    No
    innodb_fsync_thresholdinteger
    0 ... 9223372036854775807
    Default:0Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
    No
    innodb_ft_aux_tablestring

    See theTips section for more information about this flag.

    Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
    Yes
    innodb_ft_cache_sizeinteger
    1600000 ... 80000000
    Yes
    innodb_ft_enable_diag_printboolean
    on |off
    No
    innodb_ft_enable_stopwordboolean
    on |off
    No
    innodb_ft_max_token_sizeinteger
    10 ... 252
    Yes
    innodb_ft_min_token_sizeinteger
    0 ... 16
    Yes
    innodb_ft_num_word_optimizeinteger
    1000 ... 10000
    No
    innodb_ft_result_cache_limitinteger
    1000000 ... 4294967295
    No
    innodb_ft_server_stopword_tablestringNo
    innodb_ft_sort_pll_degreeinteger
    1 ...32
    Yes
    innodb_ft_total_cache_sizeinteger
    32000000 ... 1600000000
    Yes
    innodb_ft_user_stopword_tablestringNo
    innodb_idle_flush_pctinteger
    0 ... 100
    Default:100Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
    No
    innodb_io_capacityinteger
    100 ... 100000
    Default:5000

    To learn more about configuring the disk performance, see theE2 VMs table inConfigure disks to meet performance requirements.

    No
    innodb_io_capacity_maxinteger
    100 ... 100000
    Default:10000

    To learn more about configuring the disk performance, see theE2 VMs table inConfigure disks to meet performance requirements.

    No
    innodb_large_prefixboolean
    on |off

    Supported only in MySQL 5.6.

    No
    innodb_lock_wait_timeoutinteger
    1 ...1073741824
    No
    innodb_log_buffer_sizeinteger
    262144 ... 4294967295
    Yes
    innodb_log_checksumsboolean
    on |off
    default:on
    No
    innodb_log_file_sizeinteger
    MySQL 5.6:1048576 ...274877906944
    MySQL 5.7 and later:4194304 ...274877906944
    Yes
    innodb_log_spin_cpu_abs_lwminteger
    0 ...4294967295
    default:80
    No
    innodb_log_spin_cpu_pct_hwminteger
    0 ...100
    default:50
    No
    innodb_log_wait_for_flush_spin_hwminteger
    0 ...4294967295
    default:400
    No
    innodb_log_write_ahead_sizeinteger
    512 ...65536
    default:8192
    No
    innodb_lru_scan_depthinteger
    100 ... 9223372036854775807
    No
    innodb_max_dirty_pages_pctfloat
    0 ...99.99
    default:90
    No
    innodb_max_dirty_pages_pct_lwmfloat
    0 ...99.99
    default:10
    No
    innodb_max_purge_laginteger
    0 ...4294967295
    default:0
    No
    innodb_max_undo_log_sizeinteger
    10485760 ...9223372036854775807
    default:1073741824
    No
    innodb_max_purge_lag_delayinteger
    0 ...10000000
    default:0
    No
    innodb_monitor_disablestringNo
    innodb_monitor_enablestringNo
    innodb_monitor_resetstring
    counter,module,pattern,all
    No
    innodb_monitor_reset_allenumeration
    Valid values:counter,module,pattern,all
    No
    innodb_old_blocks_pctinteger
    5 ... 95
    No
    innodb_old_blocks_timeinteger
    0 ... 4294967295
    No
    innodb_online_alter_log_max_sizeinteger
    65536 ... 9223372036854775807
    No
    innodb_open_filesinteger
    100 ...2147483647
    default:
    MySQL 5.7:2000
    MySQL 8.0 and later:4000
    8.0.28: No
    8.0.27: Yes
    innodb_optimize_fulltext_onlyboolean
    on |off
    No
    innodb_page_cleanersinteger
    1 ... 64
    Supported in MySQL5.7 and later. For MySQL 5.7 and 8.0, the default is4. For MySQL 8.4, the default is equal to the value of configured for theinnodb_buffer_pool_instances flag.
    Yes
    innodb_parallel_read_threadsinteger
    1 ...256
    default:4
    No
    innodb_print_all_deadlocksboolean
    on |off
    default:off
    No
    innodb_print_ddl_logsboolean
    on |off
    No
    innodb_purge_batch_sizeinteger
    1 ...5000
    default:300
    No
    innodb_purge_rseg_truncate_frequencyinteger
    1 ...128
    default:128
    No
    innodb_purge_threadsinteger
    1 ...32
    Default values:
  • MySQL 5.6: 1
  • MySQL 5.7 and later: 4
  • Yes
    innodb_random_read_aheadboolean
    on |off
    No
    innodb_read_ahead_thresholdinteger
    0 ... 64
    No
    innodb_read_io_threadsinteger
    1 ...64
    Yes
    innodb_redo_log_capacityinteger
    MySQL 8.0.33 and earlier:8388608 (8 MB) ...137438953472 (128 GB) MySQL 8.0.34 and later:8388608 (8 MB) ...549755813888 (512 GB)

    For more information about this flag, see theTips section.

    No
    innodb_replication_delayinteger
    0 ... 4294967295
    No
    innodb_rollback_on_timeoutboolean
    on |off
    Yes
    innodb_rollback_segmentsinteger
    1 ... 128
    No
    innodb_segment_reserve_factorfloat
    .03 ... 40
    default:12.5
    No
    innodb_sort_buffer_sizeinteger
    65536 ... 67108864
    Yes
    innodb_spin_wait_delayinteger
    MySQL 5.7:0 ... 1000000
    MySQL 8.0.13+:0 ... 1000
    default:6
    No
    innodb_stats_auto_recalcboolean
    on |off
    No
    innodb_stats_include_delete_markedboolean
    on |off
    default:off
    No
    innodb_stats_methodenumeration
    nulls_equal |nulls_unequal |nulls_ignored
    No
    innodb_stats_on_metadataboolean
    on |off
    No
    innodb_stats_persistentboolean
    on |off
    No
    innodb_stats_persistent_sample_pagesinteger
    1 ... 9223372036854775807
    No
    innodb_stats_sample_pagesinteger
    1 ... 9223372036854775807
    No
    innodb_stats_transient_sample_pagesinteger
    1 ... 9223372036854775807
    No
    innodb_status_outputboolean
    on |off
    No
    innodb_status_output_locksboolean
    on |off
    No
    innodb_strict_modeboolean
    on |off
    No
    innodb_sync_array_size1 ... 1024

    Default is1.

    Yes
    innodb_sync_spin_loopsinteger
    0 ... 4294967295
    default:30
    No
    innodb_table_locksboolean
    on |off
    default:on
    No
    innodb_thread_concurrencyinteger
    0 ... 1000
    No
    innodb_thread_sleep_delayinteger
    0 ... 1000000
    No
    innodb_undo_log_truncateboolean
    on |off
    default:on
    No
    innodb_use_native_aioboolean
    on |off
    default:on
    Yes
    innodb_write_io_threadsinteger
    1 ... 64
    Yes
    interactive_timeoutinteger
    1 ... 31536000
    No
    internal_tmp_disk_storage_engineenumeration
    INNODB |MYISAM
    Default:INNODB
    Note: This flag is supported in MySQL 5.7 for Cloud SQL only.
    No
    internal_tmp_mem_storage_engineenumeration
    MEMORY,TempTable
    Note: The flag is supported in MySQL 8.0 and later for Cloud SQL..
    No
    join_buffer_sizeinteger
    128 ... 9223372036854775807
    No
    keep_files_on_createboolean
    on |off
    default:off
    No
    key_buffer_sizeinteger
    4096 ... 4294967295
    default:8388608
    No
    key_cache_age_thresholdinteger
    100 ... 9223372036854775807
    default:300
    No
    key_cache_block_sizeinteger
    512 ... 16384
    default:1024
    No
    key_cache_division_limitinteger
    1 ... 100
    default:100
    No
    lc_times_namesstring
    en_US |cs_CZ |da_DK |nl_NL |et_EE |fr_FR |de_DE |el_GR |hu_HU |it_IT |ja_JP |ko_KR |no_NO |nb_NO |pl_PL |pt_PT |ro_RO |ru_RU |sr_RS |sk_SK |es_ES |sv_SE |uk_UA
    default:en_US
    No
    local_infileboolean
    on |off
    No
    lock_wait_timeoutinteger
    1 ... 31536000
    No
    log_bin_trust_function_creatorsboolean
    on |off
    No
    log_outputset
    FILE |TABLE |NONE
    No
    log_error_verbosityinteger
    1 ... 3
    default:
    MySQL 5.7:3
    MySQL 8.0 and later:2
    No
    log_queries_not_using_indexesboolean
    on |off
    No
    log_slow_admin_statementsboolean
    on |off
    default:off
    No
    log_slow_extraboolean
    on |off
    default:off
    No
    log_slow_replica_statementsboolean
    on |off Default:offThis flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use thelog_slow_slave_statements flag. For more information, seeAliased flags.
    No
    log_slow_slave_statementsboolean
    on |off Default:offThis flag name is deprecated for MySQL 8.0.26 and later. Instead, use thelog_slow_replica_statements flag. For more information, seeAliased flags.
    No
    log_throttle_queries_not_using_indexesinteger
    0 ... 9223372036854775807
    No
    log_timestampsstring
    "UTC | SYSTEM"
    default:UTC
    No
    long_query_timefloat
    0 ...30000000

    Cloud SQL provides the ability to set this flag to less than 1 if needed.

    If thelog_queries_not_using_indexes flag is also enabled, you may see queries with less than the time specified here.

    No
    lower_case_table_names5.7 |8.0integer
    0 or1
    Default:0

    If you use the default value of0 for this flag, table and database names are case sensitive. When set to1, table and database names are case insensitive.

    For MySQL 5.7 instances, you can change the value of this flag at any time. If you do, then make sure that you understand how the change affects your existing tables and databases.

    For MySQL 8.0 and later instances, you can set the value of this flag to a desired value only while an instance is being created. After you set this value, you can't change it. Also, for an existing instance, you can't change the value of this flag.

    When creating read replicas for MySQL 5.7, MySQL 8.0, or MySQL 8.4 instances, the replica inherits this flag value from the primary.

    Yes
    mandatory_rolesstringrole name
    default:empty string
    Note:The flag is supported in MySQL 8.0 and later for Cloud SQL.
    No
    master_verify_checksumboolean
    on |off Default:offThis flag name is deprecated for MySQL 8.0.26 and later. Instead, use thesource_verify_checksum flag. For more information, seeAliased flags.
    No
    max_allowed_packetinteger
    16384 ... 1073741824

    This value must be a multiple of 1024, if sql_mode=TRADITIONAL or sql_mode=STRICT_ALL_TABLES.

    No
    max_binlog_cache_sizeinteger
    4096 ... 4294967296
    default:4294967296
    No
    max_binlog_sizeinteger
    4096 ... 1073741824
    No
    max_binlog_stmt_cache_sizeinteger
    4096 ... 4294967296
    default:4294967296
    No
    max_connect_errorsinteger
    1 ... 9223372036854775807
    default:100
    No
    max_connectionsinteger
    1 ... 100000
    No
    max_digest_lengthinteger
    0 ... 1048576
    Yes
    max_error_countinteger
    0 ... 65535
    default:
    MySQL 5.7 or lower:64
    MySQL 8.0 and later:1024
    No
    max_execution_timeinteger
    0 ... 9223372036854775807
    No
    max_heap_table_sizeinteger
    16384 ... 67108864

    See theTips section for more information about this flag.

    No
    max_join_sizeinteger
    16 ... 9223372036854775807
    No
    max_length_for_sort_datainteger
    4 ... 8388608
    No
    max_points_in_geometryinteger
    3 ... 1048576
    No
    max_prepared_stmt_countinteger
    0 ... 1048576
    No
    max_seeks_for_keyinteger
    1 ... 9223372036854775807
    No
    max_sort_lengthinteger
    4 ... 8388608
    No
    max_sp_recursion_depthinteger
    0 ... 255
    No
    max_user_connectionsinteger
    0 ... 4294967295
    No
    max_write_lock_countinteger
    1 ... 9223372036854775807
    No
    min_examined_row_limitinteger
    0 ... 4294967295
    default:0
    No
    myisam_data_pointer_sizeinteger
    2...7
    default:6
    No
    myisam_max_sort_file_sizeinteger
    0...9223372036853727232
    default:9223372036853727232
    No
    myisam_mmap_sizeinteger
    7...9223372036854775807
    default:9223372036854775807
    Yes
    myisam_sort_buffer_sizeinteger
    4096...4294967295
    default:8388608
    No
    myisam_stats_methodstring
    "nulls_unequal, nulls_equal, nulls_ignored"
    default:nulls_unequal
    No
    myisam_use_mmapboolean
    on |off
    default:off
    No
    mysql_native_password_proxy_usersboolean
    on |off
    default:off
    No
    net_buffer_lengthinteger
    1024 ... 1048576
    default:16384
    No
    net_read_timeoutinteger
    30 ... 4294967295
    No
    net_retry_countinteger
    10 ... 4294967295
    No
    net_write_timeoutinteger
    60 ... 4294967295
    No
    ngram_token_sizeinteger
    1 ... 10
    default:2
    Yes
    optimizer_prune_levelinteger
    0 ... 1
    No
    optimizer_search_depthinteger
    0 ... 62
    No
    optimizer_switchmulti-value repeated string

    See theTips section for more information about multi-value flags.

    No
    optimizer_tracemulti-value repeated string
    enabled=on,enabled=off,one_line=on,one_line=off

    See theTips section for more information about multi-value flags.

    No
    optimizer_trace_featuresmulti-value repeated string

    See theTips section for more information about multi-value flags.

    No
    optimizer_trace_max_mem_sizeinteger
    0 ... 9223372036854775807
    No
    optimizer_trace_offsetinteger
    -9223372036854775808 ... 9223372036854775807
    No
    parser_max_mem_sizeinteger
    10000000 ... 9223372036854775807
    No
    password_historyinteger0-4294967295
    default:0
    Note:The flag is supported in MySQL 8.0 and later for Cloud SQL.
    No
    password_require_currentbooleanon |off
    default:off
    Note:The flag is supported in MySQL 8.0 and later for Cloud SQL.
    No
    password_reuse_intervalinteger0-4294967295
    default:0
    Note:The flag is supported in MySQL 8.0 and later for Cloud SQL.
    No
    performance_schemaboolean
    on |off

    default:off, for MySQL 5.6, 5.7, 8.0, and 8.4 if instance RAM is less than 15 GB.

    default:on, for MySQL 8.0 and later if instance RAM is greater than 15 GB

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_accounts_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_digests_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_error_sizeinteger
    0 ...1048576
    Yes
    performance_schema_events_stages_history_long_sizeinteger
    -1 ... 1048576
    Yes
    performance_schema_events_stages_history_sizeinteger
    -1 ... 1024

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_events_statements_history_long_sizeinteger
    -1 ...1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_events_statements_history_sizeinteger
    -1 ... 1024

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_events_transactions_history_long_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_events_transactions_history_sizeinteger
    -1 ... 1024

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_events_waits_history_long_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_events_waits_history_sizeinteger
    -1 ... 1024

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_hosts_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_cond_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_cond_instancesinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_digest_lengthinteger
    0 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_digest_sample_ageinteger
    0 ... 1048576
    default:60
    No
    performance_schema_max_file_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_file_handlesinteger
    0 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_file_instancesinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_index_statinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_memory_classesinteger
    0 ... 1024

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_metadata_locksinteger
    -1 ... 104857600

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_mutex_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_mutex_instancesinteger
    -1 ... 104857600

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_prepared_statements_instancesinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_program_instancesinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_rwlock_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_rwlock_instancesinteger
    -1 ... 104857600

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_socket_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_socket_instancesinteger
    -1 ...1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_sql_text_lengthinteger
    0 ...1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_stage_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_statement_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_statement_stackinteger
    1 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_table_handlesinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_table_instancesinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_table_lock_statinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_thread_classesinteger
    0 ... 256

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_max_thread_instancesinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_session_connect_attrs_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_setup_actors_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_setup_objects_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    performance_schema_show_processlistboolean
    on |off
    Default:off
    Note:The flag is supported in MySQL 8.0.26 and later for Cloud SQL.
    No
    performance_schema_users_sizeinteger
    -1 ... 1048576

    SeeTips section for more information about performance_schema flags.

    Yes
    preload_buffer_sizeinteger
    1024 ... 1073741824
    default:32768
    No
    query_alloc_block_sizeinteger
    1024 ... 4294967295
    No
    query_cache_limitinteger
    0 ... 223338299392

    This flag is not available for MySQL 8.0 and later as the query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

    No
    query_cache_min_res_unitinteger
    0 ... 9223372036854775807

    This flag is not available for MySQL 8.0 and later as the query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

    No
    query_cache_sizeinteger
    0 ... 223338299392

    This flag is not available for MySQL 8.0 and later as the query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

    No
    query_cache_typeenumeration
    0 ... 2

    This flag is not available for MySQL 8.0 and later as the query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

    Yes
    query_cache_wlock_invalidateboolean
    on |off

    This flag is not available for MySQL 8.0 and later as the query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

    No
    query_prealloc_sizeinteger
    8192 ... 9223372036854775807
    No
    range_alloc_block_sizeinteger
    4096 ... 4294967295
    No
    range_optimizer_max_mem_sizeinteger
    0 ... 9223372036854775807
    No
    read_buffer_sizeinteger
    8192 ... 2147483647
    No
    read_onlyboolean
    on |off

    Has no effect for replicas.

    No
    read_rnd_buffer_sizeinteger
    1 ... 2147483647
    No
    regexp_stack_limitinteger
    0 ... 2147483647
    No
    regexp_time_limitinteger
    0 ... 2147483647
    default:32
    No
    replica_checkpoint_groupinteger
    32 ...524280
    Default is 512.

    This flag doesn't affect replicas that don't have multithreading enabled.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_checkpoint_group flag. For more information, seeAliased flags.
    No
    replica_checkpoint_periodinteger
    1 ...4294967295
    Default is 300.

    The unit is milliseconds.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_checkpoint_period flag. For more information, seeAliased flags.
    No
    replica_compressed_protocolboolean
    on |offThis flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_compressed_protocol flag. For more information, seeAliased flags.
    No
    replica_net_timeoutinteger
    1 ...31536000

    The unit is seconds.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_net_timeout flag. For more information, seeAliased flags.
    No
    replica_parallel_typeenumeration
    DATABASE,LOGICAL_CLOCK
    Default:
    MySQL 8.0.26 or earlier:DATABASE
    MySQL 8.0.27 or later:LOGICAL_CLOCK

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_parallel_type flag. For more information, seeAliased flags.
    No
    replica_parallel_workersinteger

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_parallel_workers flag. For more information, seeAliased flags.
    No
    replica_pending_jobs_size_maxinteger

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_pending_jobs_size_max flag. For more information, seeAliased flags.
    No
    replica_preserve_commit_orderboolean

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_preserve_commit_order flag. For more information, seeAliased flags.
    No
    replica_skip_errorsstring
    Default:OFF

    For more information about this flag, see theTips section.

    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_skip_errors flag. For more information, seeAliased flags.
    Yes
    replica_sql_verify_checksumboolean
    on |off
    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_sql_verify_checksum flag. For more information, seeAliased flags.
    No
    replica_transaction_retriesinteger
    0 ...9223372036854775807
    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_transaction_retries flag. For more information, seeAliased flags.
    No
    replica_type_conversionsString
    values:ALL_LOSSY,ALL_NON_LOSSY,ALL_SIGNED,ALL_UNSIGNED
    This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use theslave_type_conversions flag. For more information, seeAliased flags.
    No
    replicate_do_dbstring

    For more information about how to use this flag, see theReplication filters section.

    No
    replicate_do_tablestring

    For more information about how to use this flag, see theReplication filters section.

    No
    replicate_ignore_dbstring

    For more information about how to use this flag, see theReplication filters section.

    No
    replicate_ignore_tablestring

    For more information about how to use this flag, see theReplication filters section.

    No
    replicate_wild_do_tablestring

    For more information about how to use this flag, see theReplication filters section.

    No
    replicate_wild_ignore_tablestring

    For more information about how to use this flag, see theReplication filters section.

    No
    rpl_read_sizeinteger
    8192 ... 4294959104
    default:8192
    No
    schema_definition_cacheinteger
    256 ... 524288
    default:256
    No
    session_track_gtidsstring
    OFF |OWN_GTID |ALL_GTIDS
    default:OFF
    No
    session_track_schemaboolean
    on |off
    default:on
    No
    session_track_state_changeboolean
    on |off
    default:off
    No
    session_track_transaction_infostring
    OFF |STATE |CHARACTERISTICS
    default:OFF
    No
    sha256_password_proxy_usersboolean
    on |off
    default:off
    No
    show_create_table_verbosityboolean
    on |off
    default:off
    No
    show_compatibility_56boolean
    on |off

    Supported in MySQL 5.7 only.

    No
    skip_character_set_client_handshakeboolean
    on |off
    default:off
    Yes
    skip_show_databaseflag
    on |off
    Yes
    slave_checkpoint_groupinteger
    32 ...524280
    Default is 512.

    This flag doesn't affect replicas that don't have multithreading enabled.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_checkpoint_group flag. For more information, seeAliased flags.
    No
    slave_checkpoint_periodinteger
    1 ...4294967295
    Default is 300.

    The unit is milliseconds.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_checkpoint_period flag. For more information, seeAliased flags.
    No
    slave_compressed_protocolboolean
    on |offThis flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_compressed_protocol flag. For more information, seeAliased flags.
    No
    slave_net_timeoutinteger
    1 ...31536000

    The unit is seconds.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_net_timeout flag. For more information, seeAliased flags.
    No
    slave_parallel_typeenumeration
    DATABASE,LOGICAL_CLOCK
    Default:
    MySQL 8.0.26 or earlier:DATABASE
    MySQL 8.0.27 or later:LOGICAL_CLOCK

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_parallel_type flag. For more information, seeAliased flags.
    No
    slave_parallel_workersinteger

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_parallel_workers flag. For more information, seeAliased flags.
    No
    slave_preserve_commit_orderboolean

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_preserve_commit_order flag. For more information, seeAliased flags.
    No
    slave_pending_jobs_size_maxinteger

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_pending_jobs_size_max flag. For more information, seeAliased flags.
    No
    slave_skip_errorsstring
    Default:OFF

    For more information about this flag, see theTips section.

    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_skip_errors flag. For more information, seeAliased flags.
    Yes
    slave_sql_verify_checksumboolean
    on |offThis flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_sql_verify_checksum flag. For more information, seeAliased flags.
    No
    slave_transaction_retriesinteger
    0 ...9223372036854775807
    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_transaction_retries flag. For more information, seeAliased flags.
    No
    slave_type_conversionsstring
    values:ALL_LOSSY,ALL_NON_LOSSY,ALL_SIGNED,ALL_UNSIGNED
    This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thereplica_type_conversions flag. For more information, seeAliased flags.
    No
    slow_launch_timeInteger
    0 ... 31536000
    Default:2
    No
    slow_query_logboolean
    on |off

    See theTips section for more information on slow query logs.

    No
    sort_buffer_sizeinteger
    32768 ... 9223372036854775807
    No
    source_verify_checksumboolean
    on |off
    Default:offNote: This flag name is available for MySQL 8.0.26 and later only. For MySQL versions 8.0.18 and earlier, use themaster_verify_checksum flag. For more information, seeAliased flags.
    No
    sql_generate_invisible_primary_keyboolean
    on |off
    Default:off
    Note:The flag is supported in MySQL 8.0.30 and later for Cloud SQL.
    No
    sql_modestring

    See theServer SQL Modes in the MySQL documentation for allowed values, including combined modes, such asANSI.NO_DIR_IN_CREATE is not supported.

    Cloud SQL for MySQL doesn't support empty values for thesql_mode flag. Instead of using an empty value, set this flag to theNO_ENGINE_SUBSTITUTION mode.

    If specifying a comma-separated list of modes usinggcloud CLI commands, then use the--flags-file argument.
    No
    sql_require_primary_keyboolean
    on |off
    Default:off
    No
    sql_select_limitinteger0...18446744073709551615
    default:18446744073709551615

    See theTips section for more information about this flag.

    Note: The flag is supported in MySQL 8.0 for Cloud SQL and later.
    No
    stored_program_cacheinteger
    16 ... 524288
    No
    stored_program_definition_cacheinteger
    256 ... 524288
    Default:256
    No
    sync_binloginteger
    0 ... 4294967295

    The default setting of 1 enables the synchronization of the binary log to disk before transactions are committed.

    If you promote a replica with this flag enabled, the flag is automatically removed causing the promoted replica to have full durability by default. To use this flag with a promoted replica, you can update the flag to the replica after promotion.

    Note: Changing the default value for thesync_binlog flag will cause the instance to lose SLA coverage as it may reduce durability of the instance's data.

    See theTips section for more information about this flag.

    No
    sync_master_infointeger
    0 ... 4294967295
    Default:10000This flag name is deprecated for MySQL 8.0.26 and later. Instead, use thesync_source_info flag. For more information, seeAliased flags.
    No
    sync_relay_loginteger
    0 ... 4294967295
    Default:10000
    No
    sync_relay_log_infointeger
    0 ... 4294967295
    Default:10000
    No
    sync_source_infointeger
    0 ... 4294967295
    Default:10000This flag name is only available for MySQL 8.0.26 and later. For MySQL versions 8.0.18 and earlier, use thesync_master_info flag. For more information, seeAliased flags.
    No
    sysdate_is_nowboolean
    on |off
    default:off
    Yes
    table_definition_cacheinteger
    400 ... 524288
    No
    tablespace_definition_cacheinteger
    256 ... 524288
    Default:256
    No
    table_open_cacheinteger
    1 ... 524288
    No
    table_open_cache_instancesinteger
    1 ... 64
    Yes
    temptable_max_mmapinteger
    0 ... 68719476736
    Default:1073741824
    No
    temptable_max_raminteger
    2097152 ... 68719476736
    Default:1073741824
    No
    thread_cache_sizeinteger
    0 ... 16384
    No
    thread_stackinteger
    131072 ... 9223372036854775807
    Yes
    tls_versionString

    Version 5.7 to Version 8.0.27: TLSv1, TLSv1.1
    Version 8.0.28 or later:TLSv1.2
    Version 5.7: Yes

    Version 8.0 or later: No
    tmp_table_sizeinteger
    1024 ... 67108864

    See theTips section for more information about this flag.

    No
    transaction_alloc_block_sizeinteger
    1024 ... 131072
    No
    transaction_isolationenumeration
    READ-UNCOMMITTED |READ-COMMITTED |REPEATABLE-READ |SERIALIZABLE
    Yes
    transaction_prealloc_sizeinteger
    1024 ... 131072
    No
    transaction_write_set_extractionenumeration

    For information about how to use this flag and its acceptable values, seeConfiguring parallel replication. This flag is not supported in MySQL 8.4.

    No
    unique_checksboolean
    on |off
    default:on

    See theTips section for more information about this flag.

    Note: The flag is supported in MySQL 8.0 and later for Cloud SQL.
    No
    updatable_views_with_limitinteger
    0 ... 1
    No
    wait_timeoutinteger
    1 ... 31536000
    No
    windowing_use_high_precisionboolean
    on |off
    Default:on
    No

    Timezone names

    In this section, you'll learn about the time-zone names that Cloud SQL for MySQL supports.

    The table in this section displays the following:

    • Timezone name: The name that Cloud SQL for MySQL supports.
    • STD: The time-zone offset in standard time (STD).
    • DST: The time-zone offset in daylight savings time (DST).
    • Synonym names: The names for time zones that you may want to use, but they aren't supported by Cloud SQL for MySQL. If this situation occurs, then use the corresponding time-zone name.

    Time-zone names are case insensitive. You can supply the time-zone name in any case. The format for the STD and DST time-zone offsets is+/-hh:mm, and the offsets are in UTC. Not all time-zone names have corresponding synonym names. If this occurs, then use the time-zone name.

    time-zone nameSTDDSTSynonym names
    Africa/Cairo+02:00+02:00Egypt
    Africa/Casablanca+01:00+00:00
    Africa/Harare+02:00+02:00Africa/Maputo
    Africa/Monrovia+00:00+00:00
    Africa/Nairobi+03:00+03:00Africa/Addis_Ababa
    Africa/Asmera
    Africa/Dar_es_Salaam
    Africa/Djibouti
    Africa/Kampala
    Africa/Mogadishu
    Indian/Antananarivo
    Indian/Comoro
    Indian/Mayotte
    Africa/Tripoli+02:00+02:00Libya
    Africa/Windhoek+02:00+02:00
    America/Araguaina−03:00−03:00
    America/Asuncion−04:00−03:00
    America/Bogota−05:00−05:00
    America/Buenos_Aires−03:00−03:00America/Argentina/Buenos_Aires
    America/Caracas−04:00−04:00
    America/Chicago−06:00−05:00
    America/Chihuahua−07:00−06:00America/Ojinaga
    America/Cuiaba−04:00−04:00
    America/Denver−07:00−06:00America/Shiprock
    Navajo
    MST7MDT
    US/Mountain
    America/Detroit−05:00−04:00
    America/Fortaleza−03:00−03:00
    America/Guatemala−06:00−06:00
    America/Halifax−04:00−03:00Canada/Atlantic
    America/Los_Angeles−08:00−07:00
    America/Manaus−04:00−04:00Brazil/West
    America/Matamoros−06:00−05:00
    America/Mexico_City−06:00−05:00
    America/Monterrey−06:00−05:00
    America/Montevideo−03:00−03:00
    America/New_York−05:00−04:00
    America/Phoenix−07:00−07:00US/Arizona
    MST
    America/Creston
    America/Santiago−04:00−03:00Chile/Continental
    America/Sao_Paolo−03:00−03:00
    America/Tijuana−08:00−07:00Mexico/BajaNorte
    America/Ensenada
    America/Santa_Isabel
    Asia/Amman+02:00+03:00
    Asia/Ashgabat+05:00+05:00Asia/Ashkhabad
    Asia/Baghdad+03:00+03:00
    Asia/Baku+04:00+04:00
    Asia/Bangkok+07:00+07:00Asia/Phnom_Penh
    Asia/Vientiane
    Asia/Beirut+02:00+03:00
    Asia/Calcutta+05:30+05:30Asia/Kolkata
    Asia/Damascus+02:00+03:00
    Asia/Dhaka+06:00+06:00Asia/Dacca
    Asia/Irkutsk+08:00+08:00
    Asia/Jerusalem+02:00+03:00Asia/Tel_Aviv
    Israel
    Asia/Kabul+04:30+04:30
    Asia/Karachi+05:00+05:00
    Asia/Kathmandu+05:45+05:45Asia/Katmandu
    Asia/Kolkata+05:30+05:30
    Asia/Krasnoyarsk+07:00+07:00
    Asia/Magadan+11:00+11:00
    Asia/Muscat+04:00+04:00Asia/Dubai
    Asia/Novosibirsk+07:00+07:00
    Asia/Riyadh+03:00+03:00Asia/Kuwait
    Antarctica/Syowa
    Asia/Aden
    Asia/Seoul+09:00+09:00ROK
    Asia/Shanghai+08:00+08:00Asia/Chongqing
    Asia/Chungking
    Asia/Harbin
    PRC
    Asia/Singapore+08:00+08:00Singapore
    Asia/Taipei+08:00+08:00ROC
    Asia/Tehran+03:30+04:30Iran
    Asia/Tokyo+09:00+09:00Japan
    Asia/Ulaanbaatar+08:00+08:00Asia/Ulan_Bator
    Asia/Vladivostok+10:00+10:00
    Asia/Yakutsk+09:00+09:00
    Asia/Yerevan+04:00+04:00
    Atlantic/Azores−01:00+00:00
    Australia/Adelaide+09:30+10:30Australia/South
    Australia/Brisbane+10:00+10:00Australia/Queensland
    Australia/Darwin+09:30+09:30Australia/North
    Australia/Hobart+10:00+11:00Australia/Currie
    Australia/Tasmania
    Australia/Perth+08:00+08:00Australia/West
    Australia/Sydney+10:00+11:00Australia/NSW
    Australia/ACT
    Australia/Canberra
    Brazil/East−03:00−03:00America/Sao_Paulo
    Canada/Newfoundland−03:30−02:30America/St_Johns
    Canada/Saskatchewan−06:00−06:00America/Regina
    Canada/Yukon−07:00−07:00America/Whitehorse
    Europe/Amsterdam+01:00+02:00
    Europe/Athens+02:00+03:00
    Europe/Dublin+01:00+00:00Eire
    Europe/Helsinki+02:00+03:00Europe/Mariehamn
    Europe/Istanbul+03:00+03:00Turkey
    Asia/Istanbul
    Europe/Kaliningrad+02:00+02:00
    Europe/Madrid+01:00+02:00
    Europe/Moscow+03:00+03:00W-SU
    Europe/Paris+01:00+02:00MET
    CET
    Europe/Prague+01:00+02:00Europe/Bratislava
    Europe/Sarajevo+01:00+02:00Europe/Belgrade
    Europe/Ljubljana
    Europe/Podgorica
    Europe/Skopje
    Europe/Zagreb
    Pacific/Auckland+12:00+13:00NZ
    Antarctica/McMurdo
    Antarctica/South_Pole
    Pacific/Fiji+12:00+13:00
    Pacific/Guam+10:00+10:00Pacific/Saipan
    Pacific/Honolulu−10:00−10:00US/Hawaii
    Pacific/Johnston
    HST
    Pacific/Samoa−11:00−11:00Pacific/Pago_Pago
    US/Samoa
    US/Alaska−09:00−08:00America/Anchorage
    America/Juneau
    America/Metlakatla
    America/Nome
    America/Sitka
    America/Yakutat
    US/Central−06:00−05:00America/Chicago
    US/Eastern−05:00−04:00America/New_York
    US/East-Indiana−05:00−04:00America/Indiana/Indianapolis
    America/Indianapolis
    America/Fort_Wayne
    US/Mountain−07:00−06:00America/Denver
    US/Pacific−08:00−07:00America/Los_Angeles
    UTC+00:00+00:00Etc/UTC
    Etc/UCT
    Etc/Universal
    Etc/Zulu

    Timezone tables in Cloud SQL might need refreshing with the latest data. For example, a country might shift from a DST timezone offset to an STD offset ora country might introduce a new timezone.

    For every critical service agent (CSA) release for Cloud SQL, timezone tables are refreshed with the latest data. When this happens, during the non-maintenance window, the replica instances are refreshed. Primary instances are then refreshed during the maintenance window.

    You can either wait until the regular maintenance window for the CSA release or you can performself service maintenance to refresh the timezone tables with the latest data. For more information about viewing the available maintenance versions, seeDetermine the target maintenance version.

    Note: For MySQL 8.0 and later, the timezone tables are read-only. You can write to timezone tables for MySQL 5.6 and 5.7. However, we don't recommend that you write to, or delete from, these tables because this can cause issues with the replica instances.

    Tips for working with flags

    general_log, slow_query_log

    To make yourgeneral orslow query logs available, enable the corresponding flag and set thelog_output flag toFILE. This makes the log output available using theLogs Viewer in the Google Cloud console.Note thatGoogle Cloud Observability logging charges apply. To minimize instance storage cost,general andslow query logs on the instance disk are rotated when the log file is older than 24 hours (and no changes have been made within that duration) or greater than 100MB in size. Old log files are automatically deleted after the rotation.

    If thelog_output is set toNONE, you can't access the logs. If you setlog_output toTABLE, the log output is placed in a table in the mysql system database. It might consume a considerable amount of disk space. If this table becomes large, it can affect instance restart time or cause the instance to lose its SLA coverage. For this reason, theTABLE option is not recommended. In addition, the log content isn't available inLogs Explorer and it isn't rotated. If needed, you can truncate your log tables by using the API. For more information, see theinstances.truncateLog reference page.

    MySQL provides a more sophisticated utility for examining and processing binary log files calledmysqlbinlog. This utility is available with the MySQL Server software. If you have a MySQL instance, then you can usemysqlbinlog to determine your desired recovery position.

    expire_logs_days, binlog_expire_logs_seconds
    If you enable point-in-time recovery, the expiration period of your binarylogs is determined by the lesser of your transaction log retention periodand the values of these flags. You can use these flags to manage how longbinary logs are stored on your replicas. Theexpire_logs_daysflag is removed from MySQL 8.4 and later. For more information,see thetransaction log retention page.
    innodb_buffer_pool_size

    The value of this flag is the size in bytes of the buffer pool. The buffer pool size must always be equal to or a multiple of the value that you get when you multiplyinnodb_buffer_pool_chunk_size byinnodb_buffer_pool_instances. If you alter the buffer pool size to a value that's not equal to or a multiple ofinnodb_buffer_pool_chunk_size multiplied byinnodb_buffer_pool_instances, then Cloud SQL adjusts the buffer pool size automatically. You can't enable this flag on instances that have fewer than 3,840 MiB of RAM.

    You can't configure this flag for shared-core machine types (f1_micro and g1_small). Changing this flag on MySQL 5.6 requires a restart.

    In Cloud SQL, the default, minimum allowable, and maximum allowable values of the innodb_buffer_pool_size flag depend on the instance's memory. These values can be roughly calculated as a percentage of the instance's RAM. By default, the value of this flag is typically set close to the maximum allowable value. The maximum allowable allocation percentage increases with instance size. The minimum allowable value is usually about 20% of the instance's RAM.

    Approximate values for this flag:

    Instance RAM RangeMin %Default %Max %
    0 - 4.0GB of RAM~34%
    4.0GB - 7.5GB~20%~34%~34%
    7.5GB - 12GB~20%~52%~52%
    12GB - 24GB~20%~67%~67%
    24GB and above~20%~72%~72%

    Your exact values may vary. To calculate the current value for your instance, you can run the query:

    showglobalvariableslike'innodb_buffer_pool_size';

    For reference, the minimum allowable, default, and maximum allowable values are provided for the machine types below.

    Machine typeInstance RAM (GB)Min (GB)
    (% of total)
    Default (GB)
    (% of total)
    Max (GB)
    (% of total)
    db-f1-micro0.6-0.053-
    db-g1-small1.7-0.625-
    db-custom-1-38403.750.875
    (23%)
    1.375
    (37%)
    1.375
    (37%)
    db-custom-2-76807.51.5
    (20%)
    4
    (53%)
    4
    (53%)
    db-custom-4-15360153
    (20%)
    10.5
    (70%)
    10.5
    (70%)
    db-custom-8-30720306
    (20%)
    22
    (73%)
    22
    (73%)
    db-custom-16-614406012
    (20%)
    44
    (73%)
    44
    (73%)
    db-custom-32-12288012024
    (20%)
    87
    (73%)
    87
    (73%)
    db-custom-64-24576024048
    (20%)
    173
    (72%)
    173
    (72%)
    db-custom-96-36864036072
    (20%)
    260
    (72%)
    260
    (72%)
    db-custom-2-13312133
    (23%)
    9
    (69%)
    9
    (69%)
    db-custom-4-26624266
    (23%)
    19
    (73%)
    19
    (73%)
    db-custom-8-532485211
    (21%)
    38
    (73%)
    38
    (73%)
    db-custom-16-10649610421
    (20%)
    75
    (72%)
    75
    (72%)
    db-custom-32-21299220842
    (20%)
    150
    (72%)
    150
    (72%)
    db-custom-64-42598441684
    (20%)
    300
    (72%)
    300
    (72%)
    db-custom-96-638976624125
    (20%)
    450
    (72%)
    450
    (72%)

    If the memory usage is high for your instance and you'reexperiencing out-of-memory (OOM) events, then you can enable theinnodb_cloudsql_managed_buffer_pool flag to reduce the valueof yourinnodb_buffer_pool_size temporarily.For more information, seeEnable managed buffer pool.(Preview)

    innodb_cloudsql_optimized_write
    This flag is available only for Cloud SQL Enterprise Plus edition instances. The default valueisON.

    This flag improves write performance by optimizing the flushing algorithm,controlling flush limits, and adjusting background activity to prioritizeyour database write operations. In addition, this flag enables an improved crashrecovery algorithm to reduce crash recovery time andutilizes unused disk I/O throughput adaptively to accelerate buffer pool warm-up.

    For the majority of use cases,you can experience better performance such as improved throughput and reducedlatency with this flag enabled.However, if your database write operations cause extremely heavy loadon the server, then the flag can delay some background activities.This delay can cause a small increase in disk usage, which decreases automatically after the load subsides.

    By default, theinnodb_cloudsql_optimized_write flag isenabled for all new and upgraded Cloud SQL Enterprise Plus edition instances. For existing Cloud SQL Enterprise Plus edition instances, this flag is enabled after the related maintenance update is applied.

    If you need to disable the flag, then run the following command.

    gcloudsqlinstancespatchINSTANCE_NAME\--database-flags="innodb_cloudsql_optimized_write=OFF"

    Changing the value of the flag requires restarting the instance.

    innodb_file_per_table

    For all MySQL versions 5.6 and higher, the default value isON.

    innodb_flush_log_at_trx_commit, sync_binlog
    For full ACID compliance, and to maintain durability and consistency in a replication setup, theinnodb_flush_log_at_trx_commit and thesync_binlog flags must be set to the default value of1. If you change the default value, then durability might decrease, which might lead to inconsistency between the primary instance and replicas. Therefore, the instance loses its SLA coverage. In addition, any of the following might occur:
    • Data loss in certain situations, such as a VM crash or failover for regional HA instance
    • Out-of-sync data in binary log and InnoDB data files
    • PITR data loss or failure
    • Data inconsistency between a primary instance and its replicas
    • A replication break

    Setting the value of theinnodb_flush_log_at_trx_commit orsync_binlog flag to non-default values for primary, standalone, and HA instances causes reduced durability.

    If you need higher performance for read replicas, then we recommend setting theinnodb_flush_log_at_trx_commit value to2. Cloud SQL does not support setting the value for this flag to 0. If you set the flag value to 2, you must either disable the binary log on the replica, or setsync_binlog to a value other than 1 for higher performance.

    Cloud SQL might temporarily change theinnodb_flush_log_at_trx_commit andsync_binlog flag values to default when taking a backup. This might cause reduced performance when taking backups. To avoid this from impacting your instance, you can change the backup window when instance usage is low. For more information, seeCreate and manage on-demand and automatic backups.

    innodb_flush_log_at_timeout

    innodb_flush_log_at_timeout lets you modify the frequency of page flushes so you can avoid impacting the performance of binary log group commit. The default setting is once per second.

    Cloud SQL has extended this flag to support specifying a time period in microseconds.

    Examples:

    • 0.001 to specify 1 ms
    • 0.0001 to specify 100 us
    • 12.5 to specify 12.5 seconds
    • 12.005 to specify 12 seconds and 5 ms
    • 0.005100 to specify 5 ms and 100 us

    For certain workloads, using whole second granularity for flushing pages might be unacceptable in terms of potential transaction loss. Instead, you can flush pages using microsecond granularity to maintain performance without significantly compromising durability.

    The microsecond time periods for theinnodb_flush_log_at_timeout flag are only applicable when theinnodb_flush_log_at_trx_commit durability flag is set to2.

    The flushing of pages might happen more or less frequently than the value specified forinnodb_flush_log_at_timeout and the value is not the upper bound.

    innodb_redo_log_capacity, innodb_log_file_size

    If you configure a value for theinnodb_redo_log_capacityflag,then Cloud SQL ignores any value that you define fortheinnodb_log_file_size flag.

    If you don't configure any values fortheinnodb_redo_log_capacity orinnodb_log_file_sizeflags, then Cloud SQL usesthe default value of theinnodb_redo_log_capacity flag, or104857600 (100 MB).

    If you don't configure theinnodb_redo_log_capacity flag, but configuretheinnodb_log_file_size flag,then the value of your innodb redo log size is calculated byinnodb_log_file_size *innodb_log_file_in_group. For example, if you configureinnodb_log_file_size to a value of 10 GB and the default value ofinnodb_log_file_in_group is2, then the effectivevalue of your innodb redo log size is 20 GB.

    max_heap_table_size, tmp_table_size

    Exhausting the available instance memory can occur when you settmp_table_size andmax_heap_table_size too high forthe number of concurrent queries the instance processes. Exhausting the memoryresults in an instance crash and restart.

    For more information about working with these flags, seeHow MySQL Uses Internal Temporary Tables andThe MEMORY Storage Engine.

    performance_schema

    You can't enable this flag on instances with a shared core (less than 3 GB of RAM). If you enable this flag, then you can't change your machine type to a size that does not support the flag; you must first disable this flag.

    event_scheduler
    MySQL Events, also known as scheduled events, are tasks that you can schedule. Scheduled events are a group of one or more SQL statements that are set to execute at one or more specified intervals. The default value for MySQL 5.7 isOFF and the default value for MySQL 8.0 isON. To learn more about theevent_scheduler flag, see event_scheduler. If theevent_scheduler flag is set toON for a read replica, it can cause errors based on the type of statements defined in the events:
    • If your scheduled event is awrite event on a read replica, it causes an error as read replicas are read only. SeeRead Replicas for more information.
    • If your scheduled event contains a stop operation, such askill,event_scheduler applies it to the replica. This stops the replication and delete the replica.
    To avoid such errors, set theevent_scheduler flag toOFF when creating replicas.

    For more information on how to enable or disableevent_scheduler, seeConfigure database flags.

    replica_skip_errors,slave_skip_errors
    Setting thereplica_skip_errors or theslave_skip_errorsflag can cause replication issues. In general,if an error occurs while executing a statement, the replication is stopped.Using this flag will cause the error to be skipped and replication to continue,leading to inconsistency between the primary instance and replica.This can also make it harder to troubleshoot replication issues.

    Cloud SQL recommends only using this flag if necessary. If youare experiencing replication errors, seeTroubleshooting Cloud SQL: Replication more information on how to resolvethis issue.

    character_set_client
    character_set_connection
    character_set_results
    collation_connection
    innodb_buffer_pool_dump_now
    innodb_buffer_pool_load_abort
    innodb_buffer_pool_load_now
    innodb_ft_aux_table
    foreign_key_checks
    sql_select_limit
    unique_checks
    These flags can't be selected directly in the Google Cloud console or using gcloud CLI.To use these flags, use the following command:

    SETGLOBALFLAG_NAME=FLAG_VALUE

    Using theSET GLOBAL command requires theCLOUDSQL_SPECIAL_SYSEM_VARIABLES_ADMINprivilege, which is granted to thecloudsqlsuperuser role.

    Note: TheCLOUDSQL_SPECIAL_SYSEM_VARIABLES_ADMIN privilegeis only available in MySQL 8.0 for Cloud SQL.

    For more information on how to grant special privilege access to a specific user, seeAbout MySQL users.These flags are non-persisted. When your Cloud SQL instance is recreated orrestarted, the flag settings are reset back to default value.

    binlog_order_commits

    The default value for thebinlog_order_commits flag isON. Cloud SQL recommends to not change the default value of this flag. If the default value is changed toOFF, transactions in the same binary log group will commit in a different order than when they were written in the binary log. This impacts the following operations that execute transactions in the binary log order:

    • Replication: may lead to data inconsistency between the source and replicas
    • Point-in-time-recovery: may lead to data inconsistency between the PITR restored state and historical state

    optimizer_switch,optimizer_trace,optimizer_trace_features

    Optimizer flags have comma-separated values. You can set these flags usingthe Console or gcloud. For more information on how to set this flag using theconsole, seeConfigure database flags.If using gcloud, you can specify the value for these flags using two different ways:

    To set multiple optimizer sub-flags in one command, use the comma delimiter to separateeach flag name. If you set a single sub-flag value using thegcloud command, it overwrites all previously set sub-flags.For example, if you run the following command, the expected value forthebatched_key_access sub-flag is set toon and allother sub-flags for optimizer_flags are set to their default values.
    gcloudsqlinstancespatchmy-instance--database-flags=^~^optimizer_switch=batched_key_access=on
    If you run the following command, the value of theblock_nested_loop sub-flag is set toon and allother sub-flags for optimizer_switch are overwritten and set to their default values.
    gcloudsqlinstancespatchmy-instance--database-flags=^~^optimizer_switch=block_nested_loop=on
    This includesbatched_key_access, which was set toonby the previous command. To keep all previously set sub-flags and add newones, you must add the values of all sub-flags you want to set when adding anew sub-flag.

    System flags changed in Cloud SQL

    All other database system flags that are not listed in thesupported flags section are called managed flags. Forcertain managed flags, Cloud SQL sets the flag to a value other than thedefault setting to ensure Cloud SQL instances run reliably. You can't changethe values on these system flags.

    Managed flags with a non-default setting are listed below.

    Variable NameSetting in Cloud SQL.Notes
    binlog_formatROWDiffers in MySQL 5.6 only
    binlog_error_actionABORT_SERVERDiffers in MySQL 5.6 only
    innodb_doublewrite_pages64Applies to MySQL 8.0.26 and above
    innodb_file_formatBarracudaDiffers in MySQL 5.6 only
    memlocktrue
    skip_name_resolveON
    relay_log_info_repositoryTABLERemoved in MySQL 8.4
    relay_log_recoveryON
    master_info_repositoryTABLERemoved in MySQL 8.4
    rpl_semi_sync_master_enabled1
    rpl_semi_sync_master_timeout3000
    admin_address127.0.0.1Differs in MySQL 8.0 and later.
    create_admin_listener_threadON
    port-open-timeout120Differs in MySQL 8.0 and later.
    partial_revokesONMySQL 8.0 and later. For more information about this flag, seePartial revokes system flag in MySQL 8.0.

    partial_revokes system flag in MySQL 8.0 and later

    Thepartial_revokes flag allows you to limit user access on a databases schema.In Cloud SQL for MySQL version 8.0 and later, thepartial_revokes flag is set toON. This limits the use of wildcard characters when granting orrevoking user privileges to database schemas in MySQL 8.0. Update yourGRANT statement to use the full name of the database schemainstead of using wildcard characters.

    For example, if you use the following command with the%\ wildcard characterto grant privileges to a user in MySQL 5.7, then the user will be grantedprivileges to all databases ending with_foobar.

    GRANTALLPRIVILEGESON`%\_foobar`.*TO'testuser'@'%';

    However, in MySQL 8.0, users will only be granted access to the database thatis an exact match to%\_foobar.

    There are two different ways to grant access to multiple databases in MySQL 8.0 and later.

    1. You can grant permissions to specific databases using the fulldatabase names as shown in the command below:

      grantselectontest1_foobar.*to'testuser'@'%';grantselectontest2_foobar.*to'testuser'@'%';grantselectontest3_foobar.*to'testuser'@'%';
    2. Withpartial_revokes, you can use thegrant andrevoke command to grant user privileges on all database schemas while restricting access to a few database schemas.

      grantselecton*.*to'testuser'@'%';revokeselectontest3_foobar.*from'testuser'@'%';

      This grants access to all database schemas while restricting access totest3_foobar.*.

    Replication filters

    Replication filters can be set only on Cloud SQL replicas. Each replicationfilter is set as a single flag for multiple databases where each database nameis separate by a comma. You can set up a replication filter on a Cloud SQL replica usingconsole or the following command:

    gcloudsqlinstancespatchREPLICA_NAME--database-flags=^~^REPLICATION_FILTER_NAME=DATABASE_NAME1,DATABASE_NAME,etc

    Replication filters don't support database names that contain comma values. The^~^ value in the preceding command is necessary for database flags that arecomma-separated values.

    When you set a replication filter flag, keep the following in mind:

    • If the replica becomes unhealthy, then data filtered by replication filters can appear on the replica as Cloud SQL uses source data from the primary to rebuild the instance replica.
    • You can't set replication filters on themysql schema.
    • Replication filter rules don't apply to serverless exports.

    Index advisor flags

    The following is a list of database flags that Cloud SQL for MySQL usesto enable and manage features specific to theindex advisor.

    Flag nameType
    Acceptable values and notes
    Restart
    Required?
    cloudsql_index_advisor_auto_advisor_schedulestring
    default:00:00
    No
    cloudsql_index_advisor_run_at_timestampDatetime
    default:00:00:00
    No

    Aliased flags

    The following list below contains the flag names that have been changed by Cloud SQLfor MySQL versions 8.0.26 and above.

    Deprecated flag nameNew flag name
    log_slow_slave_statementslog_slow_replica_statements
    master_verify_checksumsource_verify_checksum
    slave_checkpoint_groupreplica_checkpoint_group
    slave_checkpoint_periodreplica_checkpoint_period
    slave_compressed_protocolreplica_compressed_protocol
    slave_net_timeoutreplica_net_timeout
    slave_parallel_typereplica_parallel_type
    slave_parallel_workersreplica_parallel_workers
    slave_pending_jobs_size_maxreplica_pending_jobs_size_max
    slave_preserve_commit_orderreplica_preserve_commit_order
    slave_skip_errorsreplica_skip_errors
    slave_sql_verify_checksumreplica_sql_verify_checksum
    slave_transaction_retriesreplica_transaction_retries
    slave_type_conversionsreplica_type_conversions
    sync_master_infosync_source_info

    If your Cloud SQL instance is using a deprecated flag name, thenedit your Cloud SQL instance, delete the deprecated flag name, and add thenew flag to your instance. For more information, seeSetup a database flag.

    Troubleshooting

    IssueTroubleshooting
    After enabling a flag the instance loops between panicking and crashing.Contact customer support to request flag removal followed by ahard drain. This forces the instance to restart on a different host with a fresh configuration without the undesired flag or setting.
    You see the error messageBad syntax for dict arg when trying to set a flag. Complex parameter values, such as comma-separated lists, require special treatment when used with gcloud commands.

    What's next

    Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

    Last updated 2025-12-17 UTC.