# Using MySQL client applications

> Connect to your MySQL databases from your own computer with MySQL Workbench, using a direct connection or an SSH tunnel.

Source: https://helpcenter.ruachost.com/developers/databases/using-mysql-client-applications/

MySQL client tools help you access and manage your MySQL databases. One of the main tools is **MySQL Workbench**—a free GUI application available for Windows, macOS, Linux, and other platforms.

## **Connecting to MySQL With MySQL Workbench**

There are two main connection methods you can use:

- #### Direct Connection
- #### SSH Connection (Secure Tunnel)

## **Direct Connection**

Follow these steps to set up a direct connection:

1. Open **MySQL Workbench**.
2. On the main screen, click the **+** icon beside *MySQL Connections*.
3. Enter a name for the connection.
4. Select **Standard (TCP/IP)** as the connection method.
5. In *Hostname*, type **example.com** (replace with your domain).
6. Ensure the port is **3306**.
7. Enter your username:

   - Your **ruachost.com (cPanel)** username (full access), or
   - A database-specific MySQL user created in cPanel.
8. (Optional) Enter the *Default Schema* (database name).
9. Click **Test Connection** and enter the password.
10. Select *Save password in keychain* if needed.
11. Click **OK** and continue if you see a version warning.
12. Save the connection and open it from the workspace.

#### **Important Before Using Direct Connection**

- Open a ticket on **[https://dashboard.ruachost.com](https://dashboard.ruachost.com/submitticket.php?step=2&deptid=3)** requesting inbound access to port 3306.
- Add your IP under **Remote MySQL** in cPanel.

## **SSH Connection**

To securely connect through an SSH tunnel:

1. Open **MySQL Workbench**.
2. Click the **+** beside *MySQL Connections*.
3. Type a name for the connection.
4. Choose **Standard (TCP/IP) over SSH**.
5. Enter **example.com:22** under SSH Hostname (confirm correct SSH port; some servers use **7822**).
6. Enter your **ruachost.com (cPanel)** username as SSH Username.
7. Use **localhost** as the MySQL Hostname.
8. Keep MySQL port as **3306**.
9. Enter your MySQL username (cPanel user or database-specific user).
10. Click **Test Connection** → enter cPanel password.
11. Enter MySQL user password when prompted.
12. Save passwords if desired.
13. Save the connection and open it to work with your databases.

## **More Information**

Download MySQL Workbench and documentation here:\
**<http://dev.mysql.com/downloads/tools/workbench>**
