Reputation: 761
I have set up google cloud sql
for my GCE(google compute engine)
VM instance ,but I am unable to connect to the google cloud sql
from VM instance .
In order to access the google cloud sql
from the GCE
,I have requested for a Ipv4
address for the cloud sql host . Then I have added the external IP of the GCE
to the Allow networks under the authorization section of google cloud sql setting .
Tried to access the cloud sql from the GCE
with the Ipv4
address(as the host) and database user name and password using the following syntax
mysql
--host=<instance-ip-address> --user=<user-name> --password
But getting the following error in response.
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Upvotes: 1
Views: 1350
Reputation: 1008
I suspect you haven't setup the allowed networks properly. Please double check your settings according to: https://cloud.google.com/sql/docs/access-control#appaccess
If you still have trouble, please contact [email protected] with providing your instance name.
Upvotes: 1