SSH tunnel to local port


/ Published in: Bash
Save to your folder(s)

To connect to your database remotely, tunnel in via SSH.

This creates an encrypted tunnel to your Slice’s mySQL port (3306) on your local port of 8888. Point your local admin/GUI app to localhost:8888. If this does not work, and you are running OS X with CocoaMySQL try pointing it to 0.0.0.0:8888 instead.


Copy this code and paste it in your HTML
  1. ssh -fNg -L 8888:127.0.0.1:3306 userName@remoteHost -p port#

URL: http://wiki.slicehost.com/doku.php?id=mysql_tips

Report this snippet


Comments


You need to login to view comments.