Deleting instances

Deleting an instance

Console

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

    Go to the Cloud SQL Instances page

  2. Select an instance to delete by clicking the instance name.
  3. Click Delete.
  4. In the Delete database instance dialog box, click OK.

gcloud

Delete the instance.

gcloud sql instances delete [INSTANCE_NAME]

cURL

Delete the instance.

gcloud auth application-default login
ACCESS_TOKEN="$(gcloud auth application-default print-access-token)"
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
     --header 'Content-Type: application/json' \
     -X DELETE \
     https://www.googleapis.com/sql/v1beta4/projects/[PROJECT-ID]/instances/[INSTANCE_NAME]
To see how the underlying REST API request is constructed for this task, see the APIs Explorer on the instances:delete page.

Notes:

  • You cannot delete an instance that has any replicas. You must delete all replicas first.
  • After you delete an instance, it might still appear in your project with an "unknown" size but with a "Being deleted" status. This is normal and the instance should disappear completely after a brief period of time.

  • You cannot reuse an instance name for up to a week after you have deleted an instance.

Оцените, насколько информация на этой странице была вам полезна:

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

Текущей странице
Cloud SQL for MySQL