Connecting to MySQL via SSH Tunnel (Firstserv Guide – MySQL Workbench)
This guide explains how to securely connect to your Firstserv MySQL database using an SSH tunnel in MySQL Workbench.
Using an SSH tunnel adds an extra layer of security by routing your database connection through your hosting account.
Before You Begin
Make sure you have:
- ✅ SSH access enabled on your hosting account
- ✅ Your cPanel username and password
- ✅ Your MySQL database username and password
- ✅ MySQL Workbench installed
Step 1: Create a New Connection
Open MySQL Workbench and click + to create a new connection.
Step 2: Enter Connection Details
Configure your connection as follows:
General Settings
-
Connection Name:
- Choose any name (e.g. Firstserv Database)
-
Connection Method:
Standard TCP/IP over SSH
SSH Settings
-
SSH Hostname:
yourdomain.com:722
OR your server hostname with port 722
-
SSH Username:
your cPanel username
-
SSH Password:
- Click Store in Vault (Windows) or Store in Keychain (Mac)
- Enter your cPanel password
MySQL Settings
-
MySQL Hostname:
localhost
-
MySQL Server Port:
3306
-
Username:
your MySQL database username
-
Password:
- Click Store in Vault/Keychain
- Enter your MySQL user password
Step 3: Test the Connection
- Click Test Connection
What to Expect
- You may see a security/certificate warning (this is normal)
- Confirm the warning to continue
✅ If successful, your connection is ready
Step 4: Save & Connect
- Click OK to save the connection
- Double-click the saved connection to connect
✅ MySQL Workbench will open an SSH tunnel and connect to your database
Summary
- Use Standard TCP/IP over SSH in MySQL Workbench
- Connect via:
yourdomain.com:722
- Authenticate using:
- cPanel credentials (SSH)
- MySQL credentials (database)
- Test and save your connection for easy access
Need Help?
If you have trouble connecting or need help enabling SSH access, the Firstserv support team is always happy to assist.
