Forums

Connecting Tableau to MySQL through puTTY

I've been dealing with this most of the day trying to connect Tableau to a localhost puTTY server (3333, 3306 is already taken).

I keep getting the following error, when I actually try to connect to the local server 3333 that I made with the puTTY connection: "Lost connection to MySQL server at 'reading initial communication packet', system error: 0"

The puTTY logs say:

2023-09-05 23:01:32 Sent password
2023-09-05 23:01:32 Access granted
2023-09-05 23:01:32 Local port 3333 forwarding to **user**.pythonanywhere-services.com:3306
2023-09-05 23:01:32 Opening main session channel
2023-09-05 23:01:34 Opened main channel
2023-09-05 23:01:34 Allocated pty
2023-09-05 23:01:34 Started a shell/command
2023-09-05 23:01:59 Opening connection to **user**.pythonanywhere-services.com:3306 for forwarding from 127.0.0.1:49809
2023-09-05 23:01:59 Forwarded connection refused by remote: Connect failed [Name or service not known]"

I've tried just about every combination of Server and Port, from "localhost" to "127.0.0.1", and 3333, to 22, to 3306, etc. Nothing is working.

A little bit of trial and error, but at this point I've followed the directions to the letter from here.

I'm not sure what to do at this point.

[edit by admin: formatting]

Did you edit the error message? I see that you're trying to connect with user.pythonanywhere-services.com, which is not a correct host name.

I did edit it to hide my username, but later realized there was no reason for that edit, as my username is clearly listed in the post, LOL.

Okay maybe try to isolate the problem first. Forget Tableau for a second, can you connect to the mysql database from your machine using the putty tunnelling?