I use ssh for port forwarding a lot. One of the most frequent uses is to allow for secure local access to a remote mysql server over ssh. In order for this to work you must have ssh accesss to the mysql box.
This is the format of the command. You must replace LOCAL_PORT and REMOTE_PORT with the ports you wish to use. Mysql is normally on 3306. Also replace user@remote_server with your login info.
ssh -L LOCAL_PORT:127.0.0.1:REMOTE_PORT user@remote_server
While you can forward directly from 3306 to 3306, lets say you already had a local mysql server running on 3306 and wanted to port foward you server's mysql on port 3306 to your localhost at port 3307.
ssh -L 3307:127.0.0.1:3306 user@remote_server
Also if you have ssh running on another port you can specify that with the -p argument
ssh -p 1506 -L 3307:127.0.0.1:3306 user@remote_server
Once you have established the connection, open a new local terminal session and type:
mysql -u YOUR_MYSQL_USER -p -h 127.0.0.1 -P=LOCAL_PORT
Enter the password and you are set to go
Make sure to replace YOUR_MYSQL_USER with your mysql user
account and LOCAL_PORT with the LOCAL_PORT you chose above, say 3306 or 3307.
If you want to have the connection debugged an not end up at the remote terminal you can add these additional arguments
ssh -v -f -N -L 3307:127.0.0.1:3306 user@remote_server
Remember to change the remote ssh port if you need it.
ssh -p 1506 -v -f -N -L 3307:127.0.0.1:3306 user@remote_server
Paul's Journal
My Podcast Link
06/08/2009 18:40 #48871
More SSH fun - tunneling mysql over sshCategory: computers
06/06/2009 19:48 #48854
More pics - No relation to the last jourCategory: random
Red snapper is so freakin' expensive at the coop, to be exact $30/fish. Its a whole fish. You have to clean it yourself, its not half as big as it looks in this picture. There is no such thing as organic fish - so really what is this. I could have it cooked and served to me at that price.

This bird died. Hop its not the avian flu or west nile.

People parked us in this morning and even left there car. Seriously, it makes me just want to slash their tires at this point.


This bird died. Hop its not the avian flu or west nile.

People parked us in this morning and even left there car. Seriously, it makes me just want to slash their tires at this point.

06/06/2009 19:41 #48852
Hellenic festivalCategory: festivals
we went to the Greek festival today. It's mostly a food festival.


The food is really just like Greek diner food and despite Greece being a land of seascapes, it includes no seafood. That made me sad. They even had all these historical picture of fish and fisherman.

The only thing I can think of is that the people who founded that church were mountain Greeks.
My favorite part is the loukoumi, which are also known as Turkish delights. I am obsessed with them. I decided to just learn to make them, although I bought a pack of rose flavored ones.

The really surprising parts were learning how the Greek orthodox felt about Catholics is how the Catholics feel about the Protestants. Also I learned there used to be five patriachs till the pope got power hungry. Well, at least that is their story.
On the way out the pig man christians were protesting the Greek festival with a similar furvour to the way they protest Thursday in the square. It's so weird now that they protest everything. I hope they protest the Italian festival and guidos beat the shit out of them.


This seems like a bad translation - "Our ancestor's once proved useful to humanity"

The ones in the white skirts were men.




The food is really just like Greek diner food and despite Greece being a land of seascapes, it includes no seafood. That made me sad. They even had all these historical picture of fish and fisherman.

The only thing I can think of is that the people who founded that church were mountain Greeks.
My favorite part is the loukoumi, which are also known as Turkish delights. I am obsessed with them. I decided to just learn to make them, although I bought a pack of rose flavored ones.

The really surprising parts were learning how the Greek orthodox felt about Catholics is how the Catholics feel about the Protestants. Also I learned there used to be five patriachs till the pope got power hungry. Well, at least that is their story.
On the way out the pig man christians were protesting the Greek festival with a similar furvour to the way they protest Thursday in the square. It's so weird now that they protest everything. I hope they protest the Italian festival and guidos beat the shit out of them.


This seems like a bad translation - "Our ancestor's once proved useful to humanity"

The ones in the white skirts were men.


mk - 06/07/09 19:00
Turkish Delight makes me think of the Chronicles of Narnia. I don't think I'd ever actually seen it before. I always pictured a sponge candy-like substance. Thanks :)
Turkish Delight makes me think of the Chronicles of Narnia. I don't think I'd ever actually seen it before. I always pictured a sponge candy-like substance. Thanks :)
vincent - 06/06/09 21:10
It was good running into everyone today. I didn't realize that the Crazies were out protesting another Christian denomination, but we ended up parking on Atlantic & I guess there were on Delaware. I'm just envisioning the scene now on Hertel & Delaware if they did show up to protest the Italian Heritage Fest, that is just too funny.
BTW Thanks for the Mall Link. Although I guess they may keep it open for a bit longer. :::link:::
It was good running into everyone today. I didn't realize that the Crazies were out protesting another Christian denomination, but we ended up parking on Atlantic & I guess there were on Delaware. I'm just envisioning the scene now on Hertel & Delaware if they did show up to protest the Italian Heritage Fest, that is just too funny.
BTW Thanks for the Mall Link. Although I guess they may keep it open for a bit longer. :::link:::
06/05/2009 14:04 #48844
Being chemical bombedCategory: buffalo
This morning I was climbing in the pear tee when I heard these snake like noises coming under the fence from the parking lot behind us.
I climbed higher up in the tree so i had sight of a person back there and asked him what wad going on.
Turned out to be the noise of weed killer spray hitting the ground and draining into our garden and tortoise home. When matts babysitting the kids they play back there, and we have food plants growing there.
I am so angry that to keeps weeds off there freakin blacktop, they thought it would be cool to spray into my backyard. Matt says it's illegal without notification.
I just turned the hose on and sent the shot back in the other direction. I washed out the tortoise burrough but now I am still concerned. I wonder how often they do it.
The obvious answer is a brick mini wall. Like I don't have anything better to do.
It is like having my garden chemical bombed.
I climbed higher up in the tree so i had sight of a person back there and asked him what wad going on.
Turned out to be the noise of weed killer spray hitting the ground and draining into our garden and tortoise home. When matts babysitting the kids they play back there, and we have food plants growing there.
I am so angry that to keeps weeds off there freakin blacktop, they thought it would be cool to spray into my backyard. Matt says it's illegal without notification.
I just turned the hose on and sent the shot back in the other direction. I washed out the tortoise burrough but now I am still concerned. I wonder how often they do it.
The obvious answer is a brick mini wall. Like I don't have anything better to do.
It is like having my garden chemical bombed.
tiburon1724 - 06/15/09 00:10
yeah, Erie County has a 24 hour neighbor notification law. Turn 'em in!
yeah, Erie County has a 24 hour neighbor notification law. Turn 'em in!
theli - 06/06/09 00:22
Damn Paul... You just run into one resident ass after another. Huh?
Damn Paul... You just run into one resident ass after another. Huh?
I ended up taking no pics somehow but we had a great time, the weather was awesome and afterward we had a barbecue at our house in which the grill had the most meat it has ever seen on it. I had a hamburger, a hotdog and an Italian sausage.
I hope the weather stays clear. I went to the march last night and it went by pretty quickly. Hope everyone has a good day and a good time and that if any thing crazy happens it is the good kind and not the bad kind of crazy.