cloud sql instance MySQL operation stuck

Hi, we have a cloud sql instance MySQL stuck with an “editing” operation running and never ending. Is there a way to force the stop of the operation or the stop of the instance?

1 Like

Force stopping a Cloud SQL instance or editing operation in Google Cloud

There are a few ways to force stop a Cloud SQL instance or editing operation in Google Cloud.

To force stop an editing operation:

  1. Go to the Cloud SQL Instances page in the Google Cloud Console.
  2. Click the name of the instance that is stuck in the editing operation.
  3. Click the Operations tab.
  4. Click the name of the editing operation.
  5. If the Force Stop button is available, click it.

To force stop a Cloud SQL instance:

  1. Go to the Cloud SQL Instances page in the Google Cloud Console.
  2. Click the name of the instance that you want to stop.
  3. Click the Actions menu and select Stop.
  4. In the Stop Instance dialog box, select the Force stop checkbox and click Stop.

Note: Forcing the stop of an editing operation or a Cloud SQL instance may result in data loss.

Additional considerations:

  • The availability of the Force Stop button may depend on the specific situation and the type of operation being performed.
  • The Force stop checkbox may not always be available when stopping a Cloud SQL instance, depending on the state of the instance and the permissions of the user.
  • Restarting a managed instance group (MIG) is not usually necessary to bring a Cloud SQL instance back online.
  • Forcing the stop of an operation or instance can have unintended consequences, so it is always a good idea to consult the relevant documentation or support channels if unsure.

Using the gcloud command-line tool:

The gcloud sql instances patch [INSTANCE_NAME] --activation-policy NEVER command can be used to force stop a Cloud SQL instance, regardless of whether the Force Stop option is available in the Google Cloud Console.

2 Likes

Thanks for the reply. Luckily (or unfortunately) the operation crashed and we could stop the instance normally.

I’ll remember your advice and I hope I will never have to use that command!

1 Like