Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
francescoj_albini
Contributor II
Contributor II

Does Qlik sense support mysql connection via SSH tunnel?

Does Qlik sense support mysql connection via SSH tunnel?

Has anyone ever worked on it?

Thanks

Labels (1)
2 Replies
Mike_Dickson
Support
Support

Yes, you are able to use Qlik Sense to connect with a MySQL database through an SSH tunnel, but it doesn't provide this functionality natively. You need to set up the SSH tunnel separately and then configure Qlik Sense to connect to the local end of the tunnel.

Here are general steps to set this up:

  1. Set Up the SSH Tunnel: Use an SSH client to create a tunnel from your local machine to the server where your MySQL database is hosted. The command will look something like this:

    bash
    ssh -N -L 3307:localhost:3306 username@your-server.com
    

    This command creates a tunnel from local port 3307 on your machine to port 3306 on the server (your-server.com). -N tells SSH to just set up the tunnel and not execute any commands, and -L specifies the local and remote ports for the tunnel.

    Note: Make sure to replace username and your-server.com with your actual SSH username and server address.

  2. Connect Qlik Sense to the Tunnel: In Qlik Sense, you create a new MySQL database connection, but instead of putting in the server's address, you put localhost as the server and 3307 as the port (or whatever local port you used when setting up the tunnel). Then enter your MySQL username and password as you normally would.

Remember that the SSH tunnel needs to be open for Qlik Sense to connect. If the tunnel closes, you'll need to reopen it before Qlik Sense can connect to the MySQL database.

Also, you may need to configure the SSH server and MySQL server to allow this type of connection. For instance, the MySQL server needs to accept connections from localhost, and the SSH server needs to allow tunneling. Consult the documentation for your servers or speak with your system administrator if you're unsure about these settings.

Sr. Technical Support Engineer with Qlik Support
Don't forget to mark a solution that worked for you!
ericmorel
Contributor
Contributor

Hi Mike,

 

I'm trying this recco and I'm getting this error: "Name or service not known.".  Thoughts on what I should be trying?