0
votes

I'm trying to connect to a Cloud SQL server instance, which is the relatively new Google Cloud SQL service for the Microsoft SQL format, from a Google Cloud Compute Engine instance. The compute engine is located in the same project as the sql instance. I'm following this tutorial exactly. I've installed the mssql-cli using pip and then I execute this command as in the tutorial:

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

It then starts looking promissing:

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

But after a minute or so, I get this error:

    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.
    ~$
1
Hmmm...the link you provided links to an SDK reference, not a tutorial. Is that the right link? - ingernet
Which operating system do you have on your VM.I would recommend you to follow official documentation for connecting to your instance [1]. Also you may check the issues with the python library you are using [2] [1] cloud.google.com/sql/docs/sqlserver/connect-overview [2] sqlshack.com/… - Oqueli A. Martinez

1 Answers

0
votes

In the end, I was able to solve this by noting that the administrative user is automatically called sqlserver and not root and by realizing that it would work best in Ubuntu and thus by using an Ubuntu machine. When I use that then it works:

gcloud sql connect sql-ractice-ms --user=sqlserver -d testdb