I’m using CocoaMySql as a GUI for doing some db work. It’s much faster than PhpMyAdmin in my opinion.
To connect to remote servers, I needed to set up an ssh tunnel to get around the firewall.
To do this, I opened up a terminal window and typed:
ssh -N username@mysql.server.com -L 8888:127.0.0.1:3306
where username and mysql.server.com are replaced with the appropiate values
Then in CocoaMySQL, I connect with the following:
Host: 127.0.0.1
User: mysql user
Password: mysql password
Port: 8888
The port number is arbitrary, as long as it doesn’t conflict with any other open ports and matches the port used in the ssh command.
Thanks to this thread for providing the answers!
Shaun Haber
That worked great, thanks. I couldn’t get the ‘built-in’ ssh tunneling to work
thanks for the tip! I also couldn’t get the built in ssh tunneling working. This saves me spending 100 bucks on Navicat!
Just a note to say thank you — this solved a problem I was having!
Thanks for this. I’ve been beating my head against getting it to work with the built-in tunneling dialog, but within two minutes of reading your post I was connected!
Thanks for sharing!