I have a database that runs on pythonanywhere.com, and am trying to connect Tableau to it, and need to set up an SSH Tunnel in order to do so.
The directions on pythonanywhere's website mention PuTTY, and many people on Tableau forums also use it, so this is what I'm going with. I've been trying for about 2 weeks to get this working, but no luck.
So here's what happens:
The information in the Destination field has the form
Then I hit Open, and am prompted for my sign in credentials to Python Anywhere:
Then I go to Tableau and enter the following information:
In the password field I type in my database password.
The message that always comes up is:
[MySQL][ODBC 8.0(w) Driver]Access denied for user 'myusername'@'localhost' (using password: YES) Invalid username or password.
Now obviously, there's a natural response to this: double check my password.
For now just take my word for it that I've double checked this several times and it is correct.
I've tried switching out the port
localhost, but this did not work.
I have connected to my database externally in a Jupyter Notebook using this same information, so I have some confirmation that this info has been used successfully.
I've tried connecting to MySQL Workbench using the same info and I get the same error message, which makes me think there's something about my database configuration which is not working, but I have no idea where to look.
In my PuTTY Bash terminal the command
telnet 127.0.0.1 3306 returns the message:
Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused
In my DOS terminal I get the following:
In my git BASH terminal I type in
netstat -an|grep 3306 and get:
I was on codementor trying to get this resolved, and we had the following issue:
after signing in throuhg PuTTY, I entered the following command:
mysql -h 127.0.0.1 -u jonathanbechtel -p
Which returned the following error message:
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
We also tried switching out
localhost and got a different error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
To be honest I don't understand the significance of this, but was told by him that this is unusual and might signal some security settings on my account with PythonAnywhere. I started this forum message on their forums to try and troubleshoot it.