This page shows you how to use the in-place upgrade method to upgrade a Cloud SQL Enterprise edition instance to Cloud SQL Enterprise Plus edition. Additionally, it also describes the procedure to downgrade a Cloud SQL Enterprise Plus edition instance to Cloud SQL Enterprise edition.
Upgrading to Cloud SQL Enterprise Plus edition provides you with several benefits and performance enhancements. For more information, see Introduction to Cloud SQL for MySQL editions.
To enable these enhancements for your existing Cloud SQL Enterprise edition instances, you must upgrade them to Cloud SQL Enterprise Plus edition. The upgrade process takes a few minutes to complete with an expected downtime of less than 60 seconds. Additionally, this process doesn't require your applications to change the endpoints they connect to.
Requirements
Ensure that you're running a Cloud SQL Enterprise edition instance on MySQL version 8.0.31 or later.
If your instance is on an earlier version of MySQL, then you must upgrade your instance to MySQL 8.0.31 or later, before upgrading to Cloud SQL Enterprise Plus edition. For more information, see Upgrade the database major version in-place and Upgrade the database minor version.
- Ensure that your instance uses a solid state drive (SSD).
Upgrade an instance to Cloud SQL Enterprise Plus edition
gcloud
The following code sample shows how to upgrade your instance to Cloud SQL Enterprise Plus edition:
gcloud sql instances patch INSTANCE_ID \ --edition=enterprise-plus \ --tier=MACHINE_TYPE \ --project=PROJECT_ID \Replace the following:
- PROJECT_ID: the project ID of the instance that you want to upgrade.
- INSTANCE_ID: name of the instance that you want to upgrade.
- MACHINE_TYPE: the machine type of the instance that you want to upgrade to. For more information about machine types for Cloud SQL Enterprise Plus edition, see Machine types for Cloud SQL Enterprise Plus edition instances.
REST
The following command upgrades your instance to Cloud SQL Enterprise edition and triggers a restart operation.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the project ID of the instance that you want to upgrade.
- INSTANCE_ID: the instance ID of the instance that you want to upgrade.
- MACHINE_TYPE: the machine type of the instance that you want to upgrade to. For more information about machine types for Cloud SQL Enterprise Plus edition, see Machine types for Cloud SQL Enterprise Plus edition instances.
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID
Request JSON body:
{ "settings": { "tier": "MACHINE_TYPE", "edition": "ENTERPRISE_PLUS", "dataCacheConfig": { "dataCacheEnabled": 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" }
REST v1beta4
The following command upgrades your instance to Cloud SQL Enterprise edition and triggers a restart operation.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the project ID of the instance that you want to upgrade.
- INSTANCE_ID: the instance ID of the instance that you want to upgrade.
- MACHINE_TYPE: the machine type of the instance that you want to upgrade to. For more information about machine types for Cloud SQL Enterprise Plus edition, see Machine types for Cloud SQL Enterprise Plus edition instances.
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID
Request JSON body:
{ "settings": { "tier": "MACHINE_TYPE", "edition": "ENTERPRISE_PLUS", "dataCacheConfig": { "dataCacheEnabled": 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/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/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID" }
Switch to Cloud SQL Enterprise edition
gcloud
The following code sample shows how to switch your instance to Cloud SQL Enterprise edition:
gcloud sql instances patch INSTANCE_ID \ --edition=enterprise \ --tier=MACHINE_TYPE \ --project=PROJECT_IDReplace the following:
- PROJECT_ID: the project ID of the instance.
- INSTANCE_ID: name of the instance.
- MACHINE_TYPE: the machine type of the instance that you want to switch to. For more information about machine types for Cloud SQL Enterprise edition, see Machine types for Cloud SQL Enterprise edition instances.
REST
The following command switches your instance to Cloud SQL Enterprise edition and triggers a restart operation.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the project ID of the instance.
- INSTANCE_ID: the instance ID of the instance.
- MACHINE_TYPE: the machine type of the instance that you want to switch to. For more information about machine types for Cloud SQL Enterprise edition, see Machine types for Cloud SQL Enterprise edition instances.
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID
Request JSON body:
{ "settings": { "tier": "MACHINE_TYPE", "edition": "ENTERPRISE" } }
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" }
REST v1beta4
The following command switches your instance to Cloud SQL Enterprise edition and triggers a restart operation.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the project ID of the instance.
- INSTANCE_ID: the instance ID of the instance.
- MACHINE_TYPE: the machine type of the instance that you want to switch to. For more information about machine types for Cloud SQL Enterprise edition, see Machine types for Cloud SQL Enterprise edition instances.
HTTP method and URL:
PATCH https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID
Request JSON body:
{ "settings": { "tier": "MACHINE_TYPE", "edition": "ENTERPRISE" } }
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/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/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID", "targetProject": "PROJECT_ID" }
What's next
- Learn more about Cloud SQL Enterprise Plus edition.