ERROR 2005 (HY000): Unknown MySQL server host '[35.232.51.216]' (0) in google cloud SQL client

ERROR 2005 (HY000): Unknown MySQL server host '[35.232.51.216]' (0) in google cloud SQL client



I am trying to connect my gcloud VM to a mySQL instance also on the cloud, and keep getting this errror:



ERROR 2005 (HY000): Unknown MySQL server host '[10.0.0.1]' (0)



I have followed the instructions from google's documentation here https://cloud.google.com/sql/docs/mysql/connect-admin-ip#connect-ssl and have not found any reasons as to why this could be happening after a lot of searching. I have double checked that the static IP of the VM is authorized, and that I have the right IP for the SQL database. I have tried two ways to connect, using these IP addresses and SSL.


mysql --host=[10.0.0.1] --user=root --password=



and


mysql --ssl-ca=server-ca.pem --ssl-cert=client-cert.pem --ssl-
key=client-key.pem --host=[10.0.0.1] --user=root --password=ms



Both return the same error and I am at a loss as to where to look. Has anyone seen this before, or is more experienced in SQL? This is my first time using a SQL database on google cloud...



Thanks!






It may not be secure to publish the actual IP of your MySQL instance, and I recommend obscuring when asking for help in a public platform. As to your issue, have you white-listed the IP of your VM in the Google CloudSQL console?

– Kevin Caravaggio
Sep 7 '18 at 21:01






Thanks, I changed it to a example IP instead. Yes I Whitelisted the IP in the Cloud SQL console, under "Authorization". I even re-listed it a couple times to make sure but no change....

– K.Wan
Sep 7 '18 at 21:20






I think you should use the IP without the brackets in your command. As in "--host=10.0.0.1" not [10.0.0.1]. I really think the brackets in the example is just for notation. Can you confirm that you have tried --host=IP instead of --host=[IP]?

– Kevin Caravaggio
Sep 7 '18 at 21:30





1 Answer
1



In the documentation you pointed to, the example" mysql --host=[INSTANCE_IP] --user=root --password is to imply that the "[INSTANCE_IP]" should be substituted for the IP of your MySQL instance. However, in the snippets above it appears, you may have substituted only the inner content of the braces (i.e. [10.0.0.1]), so try re-running your commands without the braces around your IP:


mysql --host=[INSTANCE_IP] --user=root --password



mysql --host=10.0.0.1 --user=root --password


mysql --host=10.0.0.1 --user=root --password






Thanks! Can't believe I've been stuck all day on this :/

– K.Wan
Sep 7 '18 at 21:49



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)