无法从谷歌云计算引擎连接到云SQL服务器。

问题描述 投票:0回答:1

我试图从一个Google Cloud Compute Engine实例连接到Cloud SQL server实例,这是相对较新的Google Cloud SQL服务,用于Microsoft SQL格式。计算引擎与 sql 实例位于同一个项目中。我的操作如下 本教程 正是如此。我已经安装了 mssql-cli 使用pip,然后我按照教程执行这个命令。

 ~$ gcloud sql connect sql-practice-ms --user=root

然后开始看起来很有希望:

    Whitelisting your IP for incoming connection for 5 minutes...done.

但过了一分钟左右,我得到了这个错误。

    ERROR: (gcloud.sql.connect) Mssql-Cli client not found.  Please install a mssql-cli client and make sure it is in PATH to be ab
    le to connect to the database instance.
    ~$
sql-server google-cloud-platform google-cloud-sql
1个回答
0
投票

最后,我通过注意到管理用户被自动调用来解决这个问题。sqlserver 而不是 root 并意识到它在Ubuntu中的效果最好,因此使用Ubuntu机器。 当我使用那台机器时,它就会工作。

gcloud sql connect sql-ractice-ms --user=sqlserver -d testdb
© www.soinside.com 2019 - 2024. All rights reserved.