Skip to main content
All CollectionsWordify Help
Connecting to MySQL via SSH on Wordify
Connecting to MySQL via SSH on Wordify

Use an SSH Tunnel with Port Forwarding to connect to MySQL over SSH

Nick avatar
Written by Nick
Updated over 3 weeks ago

Connecting to MySQL via SSH on Wordify

Prerequisites

  • MySQL GUI tool (e.g., MySQL Workbench, TablePlus, HeidiSQL, etc.)

  • SSH connection details from Wordify (found in Site > Hosting > SSH/SFTP menu)

  • For Windows users: PuTTY SSH client (download from https://putty.org)

Setting Up SSH Port Forwarding

Windows Users (PuTTY)

  1. Download and install PuTTY

  2. Open PuTTY and in the Session panel:

    • Enter your Wordify hostname in "Host Name"

    • Ensure port is set correctly (usually 22)

    • Give the session a name and click "Save"

  3. In the left menu, go to: Connection > SSH > Tunnels

    • Source port: 3306

    • Destination: 127.0.0.1:3306

    • Click "Add"

    • Make sure "Local" and "Auto" are selected

  4. Go back to Session, save your settings

  5. Click "Open" to start the tunnel

  6. Log in with your SSH credentials when prompted

macOS Users (Terminal)

  1. Open Terminal

  2. Enter the following command:

    ssh -N -L 3306:127.0.0.1:3306 YOUR_SSH_USER@YOUR_WORDIFY_HOST
  3. Replace:

    • YOUR_SSH_USER: Your SSH username from Wordify

    • YOUR_WORDIFY_HOST: Your site's SSH hostname

  4. Press Enter and provide your SSH password when prompted

  5. The terminal will appear to hang - this is normal! It means the tunnel is active

Connecting to MySQL

Once your SSH tunnel is active, you can connect using any MySQL GUI tool. The connection details will be the same regardless of your operating system:

  • Host: 127.0.0.1

  • Port: 3306

  • Username: Your MySQL username

  • Password: Your MySQL password

MySQL Workbench Setup

  1. Click "+" to create a new connection

  2. Enter a connection name

  3. Set hostname as: 127.0.0.1

  4. Port: 3306

  5. Enter your MySQL username and password

  6. Test the connection

  7. Save and connect

TablePlus Setup

  1. Click "Create a new connection"

  2. Select MySQL

  3. Fill in the details:

    • Name: Your choice

    • Host: 127.0.0.1

    • Port: 3306

    • User: Your MySQL username

    • Password: Your MySQL password

  4. Test the connection and save

Troubleshooting

  1. Connection Refused

    • Verify your SSH tunnel is still running

    • Check if another program is using port 3306

    • Confirm MySQL is running on the remote server

    • Check the connection isn't being blocked by local security software e.g. Windows Defender

  2. Access Denied

    • Verify your MySQL credentials

    • Ensure your MySQL user has proper permissions

    • Check if the MySQL user is allowed to connect from '127.0.0.1'

  3. SSH Connection Issues

    • Verify SSH credentials from Wordify dashboard

    • Double-check your SSH password

Using a Different Port

If port 3306 is already in use on your computer:

Windows (PuTTY)

  • In PuTTY's SSH Tunnels settings, use a different source port (e.g., 3307)

  • Update your MySQL GUI tool to use the same port number

macOS (Terminal)

bashCopyssh -N -L 3307:127.0.0.1:3306 YOUR_SSH_USER@YOUR_WORDIFY_HOST

Then connect using port 3307 in your MySQL GUI tool

Security Notes

  • Keep your SSH tunnel active only when needed

  • Never share your SSH or MySQL credentials

  • Keep your passwords secure

Getting Help

If you encounter issues:

  1. Check the Site > Hosting > SSH/SFTP menu for current connection details

  2. Contact Wordify support through your dashboard

  3. Remember Wordify's 1-hour max support SLA for assistance

Did this answer your question?