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.
~$
2条答案
按热度按时间7uzetpgm1#
In the end, I was able to solve this by noting that the administrative user is automatically called
sqlserver
and notroot
and by realizing that it would work best in Ubuntu and thus by using an Ubuntu machine. When I use that then it works:nlejzf6q2#
I had the same error, for me the fix was to install the mssql-cli in python because Google Cloud CLI uses python: