Forum Discussion

keel21's avatar
keel21
Regular Visitor
3 years ago
Solved

SSH Tunnel

Hello

 

A few questions about working with Mysql in the cloud as our company has our database in a cloud server

I'm aware power bi doesn't natively connect to these databases

 

The workaround I've read about is creating a SSH Tunnel through Putty, port forwarding to localhost and then creating a gateway to keep this connection open. Here is the source for that

https://www.a2hosting.com/kb/developer-corner/mysql/remote-mysql-connections

 

Questions about this:

Can this be done on a virtual machine, allowing the gateway to always be open, as opposed to on a laptop or computer that could be shut down, thus closing the gateway?

 

Can you create multiple connections to different cloud servers on the same computer or vm, such as port forward server 1 to localhost:3306 and server 2 to localhost:3307? Or will I need a new machine for each connection?

  • that's a loaded question.  Guidance for gateways differs massively depending on the expected workload. Direct Query connections require (ultra) fast network interfaces. Import Mode connections require 16+ GB of memory and ample compute cores and available disk space. Do not try to put a gateway onto a VM that also does other stuff (like a SQL Server instance) - they will make each other's lives miserable.
    Another guidance - place your gateway VM as close as possible to your main data sources to reduce the impact of network lag.

6 Replies

  • Power BI doesn't (need to) know anything about your VPN. As long as the Azure service can see your data source ( if necessary with brokerage by the gateway) you can implement whatever . It becomes more of a maintenance effort question.

    • keel21's avatar
      keel21
      Regular Visitor

      For sure. I guess my question is more so in regards to do I need a new machine for each SSH tunnel , or can I have 2 different servers forwarded to localhost on my machine, and tell Power BI to use one for a report and the second for another?

      • lbendlin's avatar
        lbendlin
        Super User

        you can do all of that on a single machine but that machine better be online 24/7 unless you have specific refresh schedules that only fall into your working hours. In other words doing this on your PC is technically possible but highly inadvisable.