Reputation: 2528
So obviously I have my certificates for connecting to the database externally, but how do I connect to an SSL-only database using Cloud Shell?
If I tap "Connect using Cloud Shell" on the Cloud SQL page and use their pre-filled Shell command:
gcloud sql connect INSTANCENAME --user=root --quiet
It won't let me log in using my root password, and as far as I can see there are no options to supply certificates like there is when just using a cli mysql client. If I turn forced SSL off, I can connect correctly. Am I missing something obvious?
Upvotes: 1
Views: 1475
Reputation: 153
Just for the digitalization of the answer above: SSL is not supported and we don't need turn forced SSL off. Instead, we need to use Cloud SQL Auth Proxy. It is quite easy to install.
Upvotes: 0
Reputation: 724
As stated on the official documentation for CloudSQL
gcloud command group doesn't support SSL connections to your CloudSQL instance.
So, it's an expected behaviour that doesn't allow you to log in.
You can try instead something like this instead.
Upvotes: 2