Editing instances

After you create an instance, you can edit the instance at any time to change its settings. For information about instance settings and how changing settings can impact an instance, see Instance Settings.

Editing an instance

Console

  1. Go to the Cloud SQL Instances page in the Google Cloud Console.

    Go to the Cloud SQL Instances page

  2. Select an instance to edit by clicking the instance name.
  3. Click Edit.
  4. Make your changes to the instance settings.

    Learn more about instance settings.

  5. 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

The following command modifies the backup start time.

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

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

HTTP method and URL:

PATCH https://www.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://www.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://www.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.

To see how the underlying REST API request is constructed for this task, see the APIs Explorer on the instances:patch page.
Оцените, насколько информация на этой странице была вам полезна:

Оставить отзыв о...

Текущей странице
Cloud SQL for MySQL
Нужна помощь? Обратитесь в службу поддержки.