A much more reliable way to create an ssh tunnel to a remote mysql database is to use gstm, the Gnome SSH Tunnel Manager...
sudo apt-get install gstm
Then run the gui application, create a named config for your connection, with host set to destination host and port set to 22 (probably) as the ssh port. Tick autostart if you want this tunnel to auto-launch on start up. Then add a port redirect, type local, port 33060, host same as destination, to port 3306.
One thing to note is that in clients, php config etc, you will probably want to use
127.0.0.1:33060 rather than
localhost:3306 because reasons. (Something to do with sockets).