On your local machine or VM, you can connect to Cloud SQL using your local MySQL client as well. We will take Debian flavor for this use case. The following are the steps for this:
- Install the mysql-client:
sudo apt-get update sudo apt-get install mysql-client
- Note your Cloud SQL instance IP and connect to your instance from your VM or local machine:
mysql --host=[INSTANCE_IP] --user=root --password
- The MySQL prompt will now be visible. From the steps of the previous section, we have our CA certificate, public key, as well as private key. Exit the prompt and start it again using these SSL credentials:
mysql --ssl-ca=server-ca.pem --ssl-cert=client-cert.pem --ssl-key=client-key.pem --host=[INSTANCE_IP] --user=root --password
- Once the MySQL prompt appears again, hit the /s command to verify that the...