Creating a SSH tunnel passing through a 'bridge' machine
You should use ssh -L option to do this
You can read this: http://www.revsys.com/writings/quicktips/ssh-tunnel.html
It is actually quite simple. It is just a matter of a single command:
ssh -N -L localhost:3306:DATABASE_MACHINE:3306 BRIDGE_MACHINE_USER@BRIDGE_MACHINE