What I want to do is connect Tableau to the database I have stored here at PythonAnywhere and use its contents to populate a dashboard in my Tableau account.
AFAIK PythonAnywhere only allows SSH connections when a database is being accessed remotely. Tableau doesn't handle SSH connections very gracefully, so in order to get my database into Tableau I have to open up an SSH Tunnel via PuTTY, and then connect Tableau locally via that.
So, ultimately, I want to log into Tableau, and enter my information on this screen: https://imgur.com/zS5Dvi2 and see my database tables in the left hand side of the connections pane so I can go to work on it.
However, for the last two weeks this has proven to be an intractable problem. I've been playing Q&A ping-pong on here, Stack Overflow, Tableau's forums and codementor trying to get a resolution, but I've basically gotten stuck in a repeating loop of error messages and people asking me to check with the other vendor on what their account settings might be.
But ultimately, I can't improve this basic process:
- I open up PuTTY
- I enter ssh.pythonanywhere.com as the Host Name with a Port Number of 22 and an SSH connection Type
- I go to Category --> SSH --> Tunnels
- in Destination I put jonathanbechtel.mysql.pythonanywhere-services.com:3306 with the options 'Local' and 'Auto' checked
- I put 3306 as the source port
- I hit 'Open' and then I follow the prompts on PuTTY to sign into my Python Anywhere account
- After that I leave the PuTTY terminal open and I open up Tableau
- I arrive at the image I linked to before
- At the Tableau screen I linked to:
- in the 'Server' field I enter 127.0.0.1 (or localhost)
- in the port field I enter 3306
- in the username field I enter my pythonanywhere username
- in the password field I enter my database password
Going through all of this gives me the following error message:
[MySQL][ODBC 8.0(w) Driver]Access denied for user 'jonathanbechtel'@'localhost' (using password: YES)
Invalid username or password.
I've checked my username and password and they work.
A few more items:
- I have a jupyter notebook that I use to connect to this database through an SSH Tunnel and it works, using the same password and username that I use in Tableau
- I have my firewall turned off
- I don't have any local databases running in the background when I do this
The questions I ask on various sites now are scatter shot, but that's because I've tried to ask more comprehensive questions on Tableau here, on SO here, and on these forums here, but there's been no resolution. So I try to find different angles to use towards the problem to see what comes up, and then ask questions based off of that in hopes of arriving at the answer in a more circumspect way. So collectively my activity on various Q&A sites probably looks unfocused, but that's only because the more obvious approaches have been exhausted.