Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Angelo95210

macrumors 6502a
Original poster
Jan 7, 2009
972
15
Paris, France
Hi guys !

I want to create a SSH tunnel from my mac to my webserver, in order to use MySQL Query Browser. I am not allowed to access the MySQL db from outside but I have an SSH access... (on port 2222)

Does someone know how to do this ?

Here are the command I tried :
Code:
ssh -p2222 -L 3306:localhost:3306 user@host
ssh -L 3306:localhost:3306 "-p2222 user@host"

Each time I got this error message from the console when I try to connect with MySQL Query Browser :
Code:
open failed: administratively prohibited: open failed

Guys would be great if you could help ! ;-)
 

Serif

macrumors regular
Jul 10, 2008
139
17
UK
Looks OK to me. There might be a clue in the server logs as regards why it is disallowing the connection. I'm guessing from the message that the MySQL server is seeing your connection but hasn't been told to accept connections from the localhost? If you have the privileges, maybe use "tcpdump -i lo0 port 3306" to watch what is happening and confirm that you're seeing the traffic hit your server.
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
It looks like they don't allow port forwarding through the server's SSH daemon by setting AllowTcpForwarding to No.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.