简体   繁体   English

无法在MySql Workbench中连接Google Cloud SQL

[英]Cannot connect Google Cloud SQL in MySql Workbench

I have created a MySql server in Google Cloud SQL and trying it to connect it from my local machine using MySql Workbench but i am not able to establish a connection to it. 我已经在Google Cloud SQL中创建了MySql服务器,并尝试使用MySql Workbench从本地计算机将其连接,但无法建立与它的连接。

I get the following error Failed to Connect to MySQL at {IP-Address}:3306 with user root(10060) 我收到以下错误,使用用户root(10060)无法连接到{IP-地址}:3306的MySQL

If you are trying to connect from outside network to gcp sql instance you need to add your public ip of your machine in the connection of sql instance 如果您尝试从外部网络连接到gcp sql实例,则需要在sql实例的连接中添加计算机的公共IP。

  1. Go to your sql instance 转到您的SQL实例
  2. Go to Connections tab 转到连接选项卡
  3. Under Connectivity select public IP and add a network by giving CIDR for your IP and save it 在“连接性”下,选择公共IP并通过为IP提供CIDR来添加网络并保存它

Then check with your sql client or workbench 然后与您的sql客户端或工作台一起检查

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM