How To Connect To MySQL Database via SSH with MySQL Workbench

This How-To Tutorial assumes you already have properly created your SSH Key and installed MySQL Workbench.  If not, then do that first.

This is quite straightforward when you follow these steps:

  1. Open MySQL Workbench like you normally do.  Click the + icon next to MySQL Connections towards the upper left of your screen.  The screen will look like this:
  2. Click on the drop down that currently says:  “Standard TCP/IP” and change it to the one that says “Standard TCP/IP over SSH”.
  3. Fill in the specific details required in this form here.  For my configuration the key fields are:
     
    • Connection Name:
    • SSH Hostname AND PORT.  (do not forget the port).  The example shows 127.0.0.1:22 but you need to get the correct values from your server you have mysql installed on.
    • SSH Username.  Remember its the SSH Username.
    • SSH Password.
    • SSH Keyfile.  You should have this already
    • MySQL Hostname.  ***This is going to be 127.0.0.1
    • MySQL Server Port.  Typically this is going to be 3306 unless you customized it.
    • MySQL username (this is the database user)
    • MySQL password

Double check you have all the correct settings and then click on Test connection.  If you have success then click on Ok and you should be good to go.

 

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

Leave a Reply