tedious icon indicating copy to clipboard operation
tedious copied to clipboard

socketPath to Google Cloud Platform MS SQL Server database

Open danielhorwitz opened this issue 3 years ago • 3 comments

I'm trying to connect to a MS SQL Server database residing on the Google Cloud Platform. The application is running as a service on a Google node, so it does not have a static IP address. To connect through the firewall, I need to provide the socket path specified by the database setup in Google Cloud Platform. How do I configure the socket path for the tedious module?

danielhorwitz avatar Dec 17 '21 15:12 danielhorwitz

An example socket path is the following: /cloudsql/horwitz-tapp-app:us-central1:horwitz-tapp-msxdb

danielhorwitz avatar Dec 17 '21 16:12 danielhorwitz

Hi @danielhorwitz, I have not used Google Cloud Platform before. I think tedious does not directly work with a socket path, but we can double-check that with Arthur. Just did a brief search online, and find a video that could be related to this. It uses something called sqlproxy to make the server reachable from localhost IP. Not sure if this can help you on this. I will post the link here: Run Windows Server & SQL Server on Google Cloud.

Hi @arthurschreiber, do you know anything about Google Cloud Platform and whether tedious support a connection using socket path?

MichaelSun90 avatar Dec 17 '21 19:12 MichaelSun90

Hi @MichaelSun90. That was a good solution for using Kubernetes. It is essentially the solution to use when running the application on a workstation, but communicating to the GCP database. It relies on starting the proxy on the workstation. Thanks for your suggestion. Sadly, I'm trying to run the application within a GCP app engine. In that case, we don't explicitly start the proxy, but have to include the socket path in the tedious connection configuration options.

danielhorwitz avatar Dec 17 '21 19:12 danielhorwitz