0

I'm running Windows 11. I have my dev environment in Debian running via WSL2.

I have this VSCode extension installed (although I have tried multiple SQL VSCode extensions and they all act the same)

If I have a VSCode window open in a WSL2 instance I am unable to connect to my DB but if I have a normal VSCode window open I am able to use any extension to access my DB.

In both instances the DB connection details are identical.

I need to use a program called ScaleFT to create a secure tunnel to the DB, I'm assuming this is the cause of the issue in part.

I am able to connect to my local dev MYSQL DB running in docker from both a WSL and normal VSCode window.

Alex
  • 475
  • 1
  • 3
  • 15
  • I believe you are probably on the right track regarding the tunnel. I assume that ScaleFT is running in Windows? Is it a simple "tunnel" or more like a VPN where traffic is redirected? – NotTheDr01ds Dec 16 '21 at 15:29

1 Answers1

1

I've found that WSL's network sharing with the host system seems to run into trouble a lot with VPN and Ad-Hoc tunnel sharing with the Windows host.

What worked best for me was just to install an independent client for the WSL host. I use Ubuntu personally but I bet this will be a drop-in for your Debian setup, too.

Add the ScaleFT Repo to apt:

echo "deb http://pkg.scaleft.com/deb linux main" | sudo tee -a /etc/apt/sources.list

Add the ScaleFT signing keys to your local keyring:

curl -fsSL https://dist.scaleft.com/pki/scaleft_deb_key.asc | gpg --dearmor | sudo tee /usr/share/keyrings/scaleft-deb-key.gpg

Pull package list and install the Linux tools:

sudo apt update && sudo apt install -y scaleft-client-tools scaleft-url-handler

That should leave you with a ready copy of the sft client tool. You can test with:

sft --version

From there, you can enroll your new WSL client and those connections should start working for you but, of course, your mileage may vary!

MC-Rhett
  • 66
  • 1
  • Thanks for that although I seem to be running into a problem when I try and run sudo apt update Err:4 http://pkg.scaleft.com/deb linux InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY – Alex Dec 17 '21 at 07:34
  • I managed to fix that issue by following the top comment here https://stackoverflow.com/questions/1139127/how-to-trust-a-apt-repository-debian-apt-get-update-error-public-key-is-not-av – Alex Dec 17 '21 at 07:41