Is it possible to use SSH Tunnel for application database?


I am in a position where my Metabase instance has access to any database only via an SSH Tunnel. I can't use H2. So I need my metabase use the MySQL DB as it's application database. This MySQL database is behind SSH. Is it possible to do such a thing?
From what I read, SSH Tunneling is possible only for DBs which need to be analyzed by Metabase.

Thank you for the reply!

Happly Holidays :balloon::balloon:

Hi @its-me
Yes, since you would create the tunnel on the host running Metabase, which essentially means that your application database environment variable would just be pointing to localhost tunnel port.

From a performance/latency stand, this isn't great. The application database should be as close to Metabase as possible.

1 Like

Hi Thanks for the answer
I can't figure how /where to do SSH tunnel for application DB.

This tutorial only talks about using export for setting up DB name , password etc.

I cant figure out how to do SSH.
Can u pls point me in the right direction?

Thanks again!

@its-me It has nothing to do with Metabase. You simply just setup a regular SSH tunnel on the host where Metabase is running:
Search the internet for setting up a SSH tunnel as a service.

1 Like

Got it Man!
Thank you so much!

Happy holidays! :christmas_tree: