I am trying to connect my Google Cloud SQL using the command line.
I can successfully connect when at home and I set a static IP address. However, I have to be on the road the next few days and I can't be at home. I am hoping to connect to mysql
and make changes as needed on the server through the hotspot
on my phone, but I would be happy with any type of internet connection working. How can I connect to my Google Cloud SQL even though I keep getting error as,
ERROR 2003 (HY000): Can't connect to MySQL on server ...
mysql
through that, but it doesn't work. I am scratching my head and cannot figure out why it won't let me connect but at home even though I authorize all other IP address I have ever tried to connect from.
The error (2003) Can't connect to MySQL server on ' server ' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.
You can use Cloud SQL, Google Cloud Marketplace, or manually install MySQL on Compute Engine. Cloud SQL offers MySQL as a web service. You can use Cloud SQL to host your MySQL database in Google's cloud, and let Google Cloud handle administrative duties like replication, patch management, and database management.
So for whatever reason, I was able to connect if I requested an IPv4 address (costs $0.01 an hour) and used that to connect instead of the free IPv6 address, then I could connect from anywhere. Otherwise I can only connect to my Cloud SQL when it is using the free IPv6 address at home. Check out the screen shot below to see which button to press on Cloud SQL Page > Access Control > IP addresses in order to request an IPv4 address and be able to connect with that IP address.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With