【问题标题】:How to connect to mysql-server deployed on compute engine from local computer?如何从本地计算机连接到部署在计算引擎上的 mysql-server?
【发布时间】:2018-09-02 01:13:04
【问题描述】:

我想使用 mysql 工作台或本地计算机上的 mysql-client 连接到部署在计算引擎上的 mysql-server。我该怎么做?。我试过this。我可以从其他虚拟机连接,但不能从我的本地计算机连接。我也无法从 cloud-shell 和应用引擎连接。

【问题讨论】:

  • 你的服务器有外网IP吗?您是否将 Google Cloud 防火墙配置为允许从您的 IP 到端口 3306 的传入 TCP 连接? mysql-server 真的在运行吗?
  • 我得到了@JordiMiralles 的解决方案。感谢您的评论。

标签: python mysql google-cloud-platform mysql-workbench google-compute-engine


【解决方案1】:

这很简单。使 vm 的外部 ip 为静态。并更改防火墙设置以接受连接。让mysql绑定外部ip,这样就可以通过外部ip连接mysql了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-25
    • 1970-01-01
    • 2020-10-28
    相关资源
    最近更新 更多