Tunneling MySQL through SSH in background

September 18, 2009 at 11:52 pm Leave a comment

If you want to access a database where you don’t have remote access privilege you must set up a ssh tunnel to your remote server.

Command format:
ssh -f -N -L localport:127.0.0.1:destination.port username@ssh_server.ip

Command example:
ssh -f -N -L 3307:127.0.0.1:3306 spocko@rutgers.edu

Set the port to 3307 so that it does not clash with your local mysql.

Then to test access to database:
mysql -h127.0.0.1 -u spocko -p -P3307

Entry filed under: Uncategorized. Tags: .

Hello world! Grrrr! Flex 3 SDK Doesn’t Support Charting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

September 2009
M T W T F S S
« Jul   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Most Recent Posts


Follow

Get every new post delivered to your Inbox.