[nycbug-talk] mysql ssh & fBSD

Mikel King mikel.king
Thu Mar 2 20:44:36 EST 2006

On Mar 2, 2006, at 8:08 PM, Okan Demirmen wrote:

> On Thu 2006.03.02 at 16:31 -0500, Mikel King wrote:
>> I have two mysql dbs running on different fBSD boxes on different
>> nodes of the net. I figured out the ssh tunnel part but for some
>> reason when I try to connect like so:
>> # establish the background tunnel
>> ssh -N -f -L 4406: some.other-box.com
>> #attempt to connect from the local mysql client to the remote server
>> mysql -P 4406 -u joe_user -p
>> All I end up with is a connection to the local db and not the remote
>> one. Any ideas why this doesn't work even though the docs I'm
>> following are claim it should.
> anything in ~/.my.cnf ? i bet mysql client is using the local socket
> instead. try adding "-h localhost".

Adding -h worked, but localhost did not. Thanks for  
pointing me onto the right path. 

More information about the talk mailing list