Pulling my hair out over SSH Tunneling to MySQL
I've followed the MySQL guide for Abuntu 10.04 down to the letter, then followed that onto the SSH Tunneling guide. I get the following error message using SQLYog/HeidiSQL (on windows 7) and Putty with SSH Tunneling:
2010-11-17 11:37:58 Forwarded connection refused by server: Administratively prohibited [open failed]
This shows up in the client as:
"Error No. 2013. Lost connection to MYSQL server at 'reading initial communication packet', system error: 2"
Now, of course this error is reasonably common on the 'net and I've googled and found LOTS of potential solutions. The problem is I have now tried them all and simply nothing has worked. Here is a list of things I have attempted:
-Making sure mysql is bound to 127.0.0.1 in my.cnf
-Making sure there's no skip-networking in my.cnf
-Adding a mysqld entry in hosts.all
-Checking ports on Windows 7 PC are not firewalled.
-Checking MYSQL is listening for localhost on port 3306 using netstat.
-Making sure AllowTcpForwarding and Gatewayports are both set to YES in sshd_config (they were not present and default to YES I believe, but I added them anyways) and restarting SSH.
So .. I admit I'm totally new to this stuff. Any ideas from you experts out there on how to tackle this problem? Even some information on things I could try to collect more information to isolate the exact cause of the issue would be great.
The last thing I did, out of frustration was completely blew away the linode, re-installed it and did NOTHING but followed the MYsql and port-tunneliing guides. It still happens.
Any help immensely appreciated. Since getting my linode account I have spent about 2 hours on installing tomcat, configuring it, testing it, installing mysql and testing it (from shell.) Now since then I've spent about 10 hours trying to get this tunneling going. I'm just about ready to give up.
Putty Event Log:
2010-11-17 11:37:08 Looking up host "xxxxx.linode.com"
2010-11-17 11:37:08 Connecting to xx.xx.xx.xxport 22
2010-11-17 11:37:09 Server version: SSH-2.0-OpenSSH_4.7p1-linode1
2010-11-17 11:37:09 We claim version: SSH-2.0-PuTTYRelease0.60
2010-11-17 11:37:09 Using SSH protocol version 2
2010-11-17 11:37:09 Doing Diffie-Hellman group exchange
2010-11-17 11:37:09 Doing Diffie-Hellman key exchange with hash xxxxx
2010-11-17 11:37:10 Host key fingerprint is:
2010-11-17 11:37:10 ssh-rsa 2048 xx:xx:xx (modified)
2010-11-17 11:37:10 Initialised AES-256 SDCTR client->server encryption
2010-11-17 11:37:10 Initialised HMAC-SHA1 client->server MAC algorithm
2010-11-17 11:37:10 Initialised AES-256 SDCTR server->client encryption
2010-11-17 11:37:10 Initialised HMAC-SHA1 server->client MAC algorithm
2010-11-17 11:37:13 Sent password
2010-11-17 11:37:13 Access granted
2010-11-17 11:37:14 Opened channel for session
2010-11-17 11:37:14 Local port 3307 forwarding to 127.0.0.1:3306
2010-11-17 11:37:14 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2010-11-17 11:37:14 Started a shell/command
2010-11-17 11:37:58 Opening forwarded connection to 127.0.0.1:3306
2010-11-17 11:37:58 Forwarded connection refused by server: Administratively prohibited [open failed]
2010-11-17 11:38:04 Opening forwarded connection to 127.0.0.1:3306
2010-11-17 11:38:05 Forwarded connection refused by server: Administratively prohibited [open failed]