I have 64-bit Ubuntu 7.10 server running as a virtual machine in VMWare Server on a 64-bit Ubuntu 7.10 desktop. On the server VM I have installed MySql and sshd and want to connect to MySql via a tunnel from the desktop. VMWare Server I installed from VMWare's site; all the other bits on the server VM and desktop machine are from Ubuntu packages. ~/.ssh/config contains
When I run this command
LocalForward 3306 server_VM_name:3306
on the client over the tunnel I get this error:
mysql -u root -p -h 127.0.0.1 mysql
Simultaneously, on the server VM's console I see
Lost connection to MySQL server at 'reading initial communication packet', system error: 0
When I run the same command on the server, mysql successfully starts. This tells me the tunnel is working but mysqld won't accept the connection. /etc/mysql/my.conf contains
channel 5: open failed: connect failed: Connection refused
and does not have the skip-networking setting.
bind-address = 127.0.0.1
I have used ssh tunnels with Linux and Windows many times without much trouble. In fact, I have successfully tunnelled an http connection from the desktop to lighttpd running on the server VM.
Any idea what I'm doing wrong or missing?