mysql ssh tunneling on ec2 instance

ssh -L 4000:xxx.yyyy.rds.amazonaws.com:3306 -i .ssh/MyKey.pem ec2-user@ec2-54-215-43-78.compute-1.amazonaws.com

 

This will connect to mysql running on xxx.yyyy.rds.amazonaws.com on port 3306 through this  host ec2-54-215-43-78.compute-1.amazonaws.com with user name ec2-user whenever we connect localhost port 4000.

To connect to  xxx.yyyy.rds.amazonaws.com mysql server just point your mysql-workbench with hostname localhost and port 4000

Advertisements

About hack4geek

The quieter you become the more you are able to hear
This entry was posted in Cloud Computing and tagged , , , . Bookmark the permalink.

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 )

Google+ photo

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

Connecting to %s