0
votes

How to create a MySQL 5.7 cloud sql instance with the gcloud utility?

I can create a 5.7 instance using the GCloud (web) console on my project but tt doesn't work when I use the gcloud cli command using the dedicated option : " --database-version=MYSQL_5_7" (it's OK with the value MYSQL_5_6 that is also the default)

gcloud sql instances create test57euw1b --tier=D0 --database-version=MYSQL_5_7 --gce-zone=europe-west1-b
ERROR: (gcloud.beta.sql.instances.create) HTTPError 400: Invalid instance property.

I'm running on Ubuntu 1.16.04 ad here my Gcloud CLI version : $ gcloud --version Google Cloud SDK 165.0.0 alpha 2017.03.24 beta 2017.03.24 bq 2.0.25 core 2017.07.28 gcloud gsutil 4.27 kubectl

The same happens usin "beta": gcloud beta sql instances create test5757 --tier=D0 --database-version=MYSQL_5_7 --gce-zone=europe-west1-b

I'd like to be able to create a 5.7 instance with gcloud to script it.

1

1 Answers

2
votes

I think the problem here is that D0 is a first generation tier. First generation does not support MySQL 5.7 (5.5. and 5.6 only).

Please try with something like --tier=db-n1-standard-2.