Mysql tunnel on Mac
|
|
Hi, In the past I’ve connected to the mysql cluster from a Windows machine without problems. I’m now trying to get a tunnelled connection working on a Mac. I’ve followed the notes on the WIKI re tunneling through to MYSQL (from a MAC) but can’t get a connection. I don’t have MySQL running locally (I stopped the service). I have a SSH shell running with the tunnel commands as per the WIKI. Error msg is: “Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) (code 2002)” Can you suggest any pointers to diagnose the problem further? Cheers Rob |
|
|
Hi Rob, I think the wiki page is slightly misleading, in that it tells you to connect to “localhost”. If you do connect to localhost, mysql interprets that as you want to connect to a socket, and looks for the default socket instead. In your case, You actually want to connect to Personally instead of stopping the local mysql service, I just make the local tunnel port The MySQL GUI I use on the mac is Sequel Pro, which happens to have ssh tunnelling built right into it. You just tell it which host to tunnel through and it deals with setting up the tunnel and connecting to mysql over it. HTH, |