I came across this search for a solution to similar problem.
Did you try using 127.0.0.1 instead of 'localhost' for the server name? That fixed it for me.
5 of 5 people found this helpful
You have most likely resolved this but it is all I came across on Tableau's site when facing the port forwarding issue so I want to show how I was able to make this connection for others who are searching. The link below is the guide I followed to get mine connected. It is not Tableau specific but the issue is not related to anything in Tableau. It has everything to do with how you set up your SSH Tunnel in PuTTY or other. The port forwarding setup makes any call to a given port (that you define) redirect the call to the MySQL address on your server. You define the port in PuTTY and then use that port in Tableau along with the address of your mysql instance.
I the first screenshot you will see I added 127.0.0.1:3306 as the destination. This is the address of MySQL as setup on your server. I included 9990 as the source port. This is the port that PuTTY will be monitoring for any given calls. Once you have these defined click add and then save your session and connect with you server credentials through PuTTY. Go to Tableau.
In the second screenshot you will see that I used 127.0.0.1 for the server and 9990 for the port that I defined in PuTTY. You then add the credentials that correspond to your MySQL user that is setup on your server.
I hope that this explanation will help someone do it a little quicker than I did the first time.
To anyone who wants to connect to either mySQL or Postgres,
the solution here really works. After connecting through putty ssh, in tableau you need to set the hostname to be 127.0.0.1, and then you are connected to the database! I've been reading through everything in this community for two days and finally I found the right answer. Many thanks!
This should be set as answered. This is exactly how I have it set up on my Tableau server.
Old post but would like to thank you, the solution worked for me as well, very easy to setup.
This is not working for me. I'm new to tableau and I'm only using a trial version. I just want to test this for now and I've done everything that you said here but it doesn't seem to work. I'm not sure what I'm missing here.
Can I ask for help?
great answer but this i how it is done using PuTTY on windows platforms what about MAC platform, there is no PuTTY for MAC??
I m struggling to keep updated the datasource (a custom Query from our MySQL server) created with tableau desktop. Is there a solution for this problem?