This page describes how to edit an existing Cloud SQL instance.
After you create an instance, you can edit it while it's running to change its settings. For information about instance settings and how changing settings can impact an instance, see Instance Settings.
Edit an instance
Most edits can be applied to an instance only when it's running.
Console
-
In the Google Cloud console, go to the Cloud SQL Instances page.
- To open the Overview page of an instance, click the instance name.
- Click Edit.
- In the Configuration options section, update any editable settings for
your instance.
Learn more about instance settings.
- Click Save to apply your changes.
gcloud
The following command modifies the backup start time.
gcloud sql instances patch INSTANCE_NAME \ --backup-start-time 16:00
If the patch modifies a value that requires a restart, you will see a prompt to proceed with the change or cancel.
REST v1
The following command modifies the backup start time.
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": { "backupConfiguration": { "startTime": "16:00", "enabled": true, "binaryLogEnabled": true } } }
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{ "kind": "sql#operation", "targetLink": "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id", "status": "PENDING", "user": "user@example.com", "insertTime": "2020-01-16T02:32:12.281Z", "operationType": "UPDATE", "name": "operation-id", "targetId": "instance-id", "selfLink": "https://sqladmin.googleapis.com/v1/projects/project-id/operations/operation-id", "targetProject": "project-id" }
If the patch modifies a value that requires a restart, you will see a prompt to proceed with the change or cancel.
REST v1beta4
The following command modifies the backup start time.
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": { "backupConfiguration": { "startTime": "16:00", "enabled": true, "binaryLogEnabled": true } } }
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{ "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-16T02:32:12.281Z", "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 the patch modifies a value that requires a restart, you will see a prompt to proceed with the change or cancel.