0

I'm trying to connect my local MySQL to a test 2nd generation MySQL instance on Google SQL platform using the following command on my windows laptop.

mysql --host=130.211.xx.xx --port=3306 --user=root --password

I double checked my IP address with whatismyIPaddress.

I can connect via Google Cloud Shell on the Google Platform itself and also ping the IP address from the local cmd prompt.

As a troubleshooting step I have disabled the local firewalls on my laptop and granted full access to 0.0.0.0/0 to allow all connections on the google platform console.

still no joy from either a cmd line connection on windows or using a putty client, can anyone give me any further pointers on the missing step?

Cheers..

Chris Wood
  • 535
  • 9
  • 28
  • I'm not 100% sure on this one, but I believe, by default, that 3306 is only opened for internal traffic on the Google Platform. It's generally good practice to not expose your database to the internet. You will need to open 3306 to external so you can connect. [Check out this question for instructions](http://stackoverflow.com/questions/21065922/how-to-open-a-specific-port-such-as-9090-in-google-compute-engine) – JNevill May 17 '16 at 16:05
  • thanks, this link is referring to connecting to Google compute instance, basically a VM. I am trying to connect my workbench to the managed service of google SQL cloud, therefore I dont have config.ini etc. I've followed the tutorials and allowed my specific ip address access – Chris Wood May 18 '16 at 10:05

2 Answers2

1

If you are behind a NAT your IP might change which prevents you from accessing the Cloud SQL instance. I would recommend setting up access using SSL certificate. More information about the setup can be found in this Help Center article.

George
  • 1,110
  • 8
  • 17
0

You may need to allow remote connections to your remote database in the server and database configuration. These kinds of connections are typically disabled by default.

Brendan
  • 474
  • 4
  • 7