Cloud SQL minor patch upgrade not working for MySQL

Viewed 82

As per release notes I should be able to upgrade the minor patch of the database, which by default is 8.0.26 in newly fresh instances:

May 26, 2022

Cloud SQL for MySQL now supports minor version 8.0.29. To upgrade your existing instance to the new version, see Upgrade the database minor version.

I triggered a minor patch upgrade using GCP CLI for MySQL. The command output is successful but the database patch didn't change. Used the following command:

$ gcloud sql instances patch mysqldb
The following message will be used for the patch API method.
{"name": "mysqldb", "project": "myproject", "settings": {}}
Patching Cloud SQL instance...done.     
Updated [https://sqladmin.googleapis.com/sql/v1beta4/projects/myproject/instances/mysqldb].

It didn't upgrade, so I restarted the MySQL instance, and even after that the version remained 8.0.26.

enter image description here

enter image description here

1 Answers

This is expected because when you execute gcloud sql instances patch mysqldb this will do nothing about an upgrade because actually you're not setting what to patch.

If you look at the body sent to the API it is almost "empty"

{"name": "mysqldb", "project": "myproject", "settings": {}}

Moreover, in the docs you link it mentions that to upgrade the instance you should specify the new version.

gcloud sql instances patch mysqldb --database-version=MYSQL_8_0_29

which results in

{"databaseVersion": "MYSQL_8_0_29", "name": "mysqldb", "project": "myproject", "settings": {}}

enter image description here

Related