Yuriy Zisin Development as a lifestyle

3Sep/090

MySQL over SSH tunnel

Sometimes we face a problem when we have SSH access to the server, but not to MySQL.
Here is a simple workaround - SSH tunnel:

ssh -f -N -L LOCAL_PORT:127.0.0.1:3306 USER@HOST

This command allows you to map remote port to the local one via SSH tunnel.

  • LOCAL_PORT - local port to map to
  • USER - SSH username
  • HOST - remote host

Surely, you can map other ports as well.

When you mapped the port, you can connect to MySQL using your favorite client (you need to specify LOCAL_PORT as MySQL server port in connection settings).

16Feb/090

Hello World!

It’s a tradition. When someone starts studying programming discipline the first program usually outputs ‘Hello world’.

Keeping the tradition I start my blog by ‘Hello world!’ post :)

Everything about me you can see at http://www.yzisin.com/, so just blog is here.

Filed under: Misc No Comments