Reputation: 3585
I have created a ssl follow:
And read this document:
After I created a new mysql instance and download the three pem files to local. I want to connect to that server:
mysql -u<USERNAME> -p -h <IP_ADDRESS> --ssl-ca=/local/path/to/server-ca.pem --ssl-cert=/local/path/to/client-cert.pem --ssl-key=/local/path/to/client-key.pem
And type the password, again it said:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Why?
Upvotes: 2
Views: 7970
Reputation: 173
Did you follow the instructions under the heading "Grant access to your instance? It links to another document that explains how to add IP addresses to Authorized Network list of your Cloud SQL instance. Even when using SSL certificates you must add the IP address as an Authorized Network.
Upvotes: 4