Monday, February 19, 2018

[google-cloud-sql-discuss] Re: Cannot connect using gcloud

Thank you for your reply Fady. I have manually added my IP; which is the same viewed from both of the links you provided. Trying to connect with the mysql client yields the same response:

$ mysql -h 35.195.x.x  -u root -p
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '35.195.x.x' (110)

I followed the instructions in your first link [1] and have an ipv4 IP address for the database so the issues mentioned in the stackoverflow link shouldn't apply.

Regards,
Stephen

On Friday, 16 February 2018 22:54:45 UTC, Fady (Google Cloud Platform) wrote:

Hello Stephen,


Since you are able to connect through cloudshell using the same gcloud commands, I suspect it is an issue within your local machine. Generally, when this error is logged, it means that the Cloud SQL instance did not whitelist (authorize) your IP, but could also be an underlying networking issue. In your message, you mentioned that you can see an IP address being authorized. It could be that your true IP address is different (computer behind proxy). You may find your IP through following both scenarios in this document . Then, to isolate the issue you may try the following:


  1. Manually add your computer's IP address in the authorization list.

  2. use this command (gcloud uses the same client mysql command on your machine after the automatic whitelisting):


mysql -h <yourCloudSQLIP>  -u root -p


More troubleshooting steps can be found here [1] [2].You may also check these very similar issues at stackoverflow here [3] [4] . Furthermore,you may try other methods to connect using this guide. I hope this helps.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/aab4162e-b020-4a73-b2e3-e9ff0acf866d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment