ssh -f -N -L 3307:127.0.0.1:3306 [email protected]
# 127.0.0.1 rather than localhost: the client uses a unix socket for
# localhost and the tunnel would never be touched
mysql -h 127.0.0.1 -P 3307 -u reporting -p shop
ssh -f -N -L 3307:127.0.0.1:3306 [email protected]
# 127.0.0.1 rather than localhost: the client uses a unix socket for
# localhost and the tunnel would never be touched
mysql -h 127.0.0.1 -P 3307 -u reporting -p shop