Google Cloud SQL - ERROR 2003 (HY000): Unable to connect to MySQL

I am trying to connect my Google Cloud SQL using the command line.
I can connect successfully when at home and I have set a static IP. However, in the coming days I have to be on the road and I cannot be at home. I hope to connect to mysql

and make the necessary changes to the server via hotspot

on my phone, but I would be happy with any type of internet connection. How can I connect to my Google Cloud SQL even though I keep getting error like

ERROR 2003 (HY000): Unable to connect to MySQL on server ...

  • I tried to instantiate VM Compute Engine and set static IP and connect to it mysql

    , but it doesn't work.
  • I always check the corresponding IP from which I am connecting.

I'm scratching my head and can't figure out why it won't let me connect, but at home, although I do allow all other IPs I've ever tried to connect with.

+3


source to share


1 answer


For some reason, I was able to connect if I requested an IPv4 address (costs $ 0.01 per hour) and used that to connect instead of the free IPv6 address, after which I could connect from anywhere. Otherwise, I can only connect to my Cloud SQL when it is using the free IPv6 address at home. View the screenshot below to see which button to click on Cloud SQL Page> Access Control> IP Addresses to request an IPv4 address and be able to connect to that IP address.



enter image description here

+3


source







All Articles