Starting, Stopping, and Restarting Instances

This page describes how to start an instance, stop an instance, or restart an instance that is running.

Starting an instance

Start an instance that is stopped to allow connections and operations.

To start 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 start by clicking the instance name.
  3. Click Start, in the button bar at the top of the page.
  4. In the Start database instance? dialog box, click Start.
    The activation policy of the instance is set to Always and the instance is started.

gcloud

Start the instance:

gcloud sql instances patch [INSTANCE_NAME] --activation-policy ALWAYS
To see how the underlying REST API request is constructed for this task, see the APIs Explorer on the instances:patch page.

Stopping an instance

You can manually stop an instance when needed. When you stop an instance, it remains stopped until you start it again.

To stop 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 restart by clicking the instance name.
  3. Click Stop, in the button bar at the top of the page.
  4. In the Stop database instance? dialog box, click Stop.

    The activation policy of the instance is set to Off (Never) and the instance is stopped.

gcloud

Stop the instance:

gcloud sql instances patch [INSTANCE_NAME] --activation-policy NEVER
To see how the underlying REST API request is constructed for this task, see the APIs Explorer on the instances:patch page.

Restarting an instance

Restarting an instance drains the connections from the instance and stops it. Next, the instance restarts and is ready to accept new connections.

To restart 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 restart by clicking the instance name.
  3. Click Restart, in the button bar at the top of the page.
  4. In the Restart database instance dialog box, click Restart.

gcloud

Restart the instance:

gcloud sql instances restart [INSTANCE_NAME]
To see how the underlying REST API request is constructed for this task, see the APIs Explorer on the instances:restart page.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud SQL for PostgreSQL