Pregunta

I am having trouble making the initial connection to my freshly created cloud sql instance.

I followed the steps outlined here: https://developers.google.com/cloud-sql/, which includes getting an IP, whitelisting my IP, and setting a root password.

However, when I try to connect using the mySQL command line tool, I get this error message:

mysql --host=xxx.xxx.xx.xxx --user=root --password

ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xx.xxx' (10060)

I have a feeling that struggling at such a basic step implies my issue is specific only to me (calling for google cloud sql support folks).

¿Fue útil?

Solución 2

My issue turned out to be related to the ISP (comcast) blocking outbound requests on port 3306. After setting up port forwarding, I'm able to connect directly from my pc to cloud sql WITHOUT using a GCE instance.

If others encounter this issue, I would recommend checking whether the port 3306 is available first (firebind, portquiz, etc).

Otros consejos

I had the same issue, after a few minutes I got it going..

  1. Make your GCE service has cloud SQL enabled (during instantiation)
  2. Have a static ip for your GCE instance (you can use cloud console even while instance is running), and configure cloud SQL to accept this ip
  3. set a root password for the cloud SQL

then your command is mysql --host= --user=root --password=

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top