Connect to local database

So the case is I have this database on MS SQL Server which is not permitted to be exposed on cloud (like microsoft azure, etc). I have a copy of the database on my local PC and want to use it as a database resource for my retool table. What would be the solution to that?

I saw in this video https://www.youtube.com/watch?v=4CTRpIwe0cg that the self hosted version of retool is for deploying retool into my local PC. That is not what I want. I want the database on my local PC to be used in the online version of retool. Please give me advice on how to do this.

Thank you.

Hi @stevinass , welcome,

The only way on how to achieve this is by running an SSH server on your local pc and expose that to the internet. The add a MS SQL resource and enable the SSH tunnel.

Cloudflare tunnels are super handy. When developing retool apps, I run my Api locally and point to it from retool using a tunnel. It works like a charm

Agree, Ngrok is a similar service. Have used it for development purposes, but wouldn’t use it for production as it was slowing down the app.

hi! thank you for the answer. Can you please give me the steps on how to setup the Ngrok to connect to retool?

Hi @stevinass

Install ngrok by following their documentation (depends of your system), then, you can find the specific use-case to tunnel a local mysql database here:

Basically you just need to run this command ngrok tcp 3306 then create in Retool a new MySql resource by adding the host/port provided by Ngrok.

Hope this help.

2 Likes