Using MySQL Administrator Over a Secure (ssh) Connection

MySQL Administrator is not designed to work over a secure connection like ssh. By using ssh tunneling, you can connect to your remote MySQL servers from your workstation.

MySQL Tools

Download the MySQL Tools package.
Install the MySQL Tools package. On the Mac, just drag to Applications.

Create the Tunnel

To create the tunnel, open a shell (Terminal on the Mac) and run the following:

$ ssh -N -L3306: username@remote_hostname

-N instructs ssh to run silently without creating a remote shell.
-L a:b:c instructs ssh to use port “a” on the local machine and map it (from the remote server’s viewpoint to port c on machine b).
Now you have a secure tunnel to the server.

Use the Right Hostname

If you run on a Un*x based workstation (i.e. Mac or Linux), when you run either the MySQL Administrator or the MySQL Query Browser, set the “Server Hostname” field to “”.

MySQL Administrator connection dialog

If you skip this step you will receive the following error:
Error Dialog

This entry was posted in Mac, SysAdmin and tagged , , , , , , . Bookmark the permalink.

8 Responses to Using MySQL Administrator Over a Secure (ssh) Connection

  1. Pingback: Connecting to MySQL on a remote server via SSH tunnel « Peter Cossey

  2. athosisus says:

    So what to do with the error message?

  3. athosisus says:

    I mean: following your instruction, I’ve got the same error message…

  4. athosisus says:

    Mea culpa, mea maxima culpa: I did not followed… I wrote “localhost” instead of “”. Sorry, for messing up, and thanks for your post…

  5. Thanks for stopping by.
    I hope it was helpful.

  6. VPN Lover says:

    I have to say, SSH was the best thing they ever came out with. You can’t beat its security nor its reliabilty.

  7. Mukul says:

    Just what I was looking for. Thanks a ton!

  8. Glad you found it useful. 🙂

Leave a Reply