> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using MySQL client applications

> Learn to access and manage MySQL databases using MySQL Client with code snippets and instructions.

This article describes how to use MySQL client applications to access and manage your MySQL databases.

## MySQL client applications

MySQL provides a GUI (graphical user interface) client application that you can use for database management. **MySQL Workbench** is an integrated tools environment that enables you to manage databases, run queries, and much more. It replaces the older MySQL GUI Tools application bundle, which is no longer actively developed.

MySQL Workbench is free to download and use. There are versions for Microsoft Windows, macOS, Linux, and other operating systems.

## Connecting to databases with MySQL Workbench

MySQL Workbench enables you to quickly connect to your MySQL databases. This article covers two methods:

* **Direct connection:** This method establishes a direct connection from your computer to the MySQL server.
  > 🚧 Important
  >
  > Before you can establish this type of connection, you must do two things:
  >
  > * Open a support ticket at [https://my.hosting.com](https://my.hosting.com). In the ticket, specify that you want to enable inbound access to MySQL port 3306 for your account.
  >
  > * Enable remote MySQL access for your IP address in cPanel. For information about how to do this, please see [this article](/docs/remote-mysql-access).

* **SSH connection:** This method uses SSH to establish a secure connection from your computer to the MySQL server.

### Method #1: Direct connection

To configure a direct connection to MySQL, follow these steps:

1. Start MySQL Workbench.

2. From the workspace page, click the **+** icon next to **MySQL Connections**. The **Setup New Connection** dialog appears.

3. In the **Connection Name** text box, type a name for the connection.

4. In the **Connection Method** list box, select **Standard (TCP/IP)**.

5. On the **Parameters** tab, in the **Hostname** text box, type `example.com`, where *example.com* represents your domain name.

6. Confirm that the **Port** text box is set to **3306**.

7. In the **Username** text box, type one of the following usernames:

   * **Your hosting.com (cPanel) account username:** With this username, you can access all of the MySQL databases on your hosting account.

   * **A MySQL database username you created in cPanel:** With this username, you can access all of the MySQL databases for which the specified user has been granted privileges.

8. In the **Default Schema** text box, type the name of the MySQL database that you want to access. Alternatively, you can leave this text box blank to select the database later.

9. Click **Test Connection**, and then in the **Password** text box, type the password for the username you specified in step 7.

   > 👍 Tip
   >
   > To have MySQL Workbench remember your password, select the **Save password in keychain** check box.

10. Click **OK**.

    > 📘 Note
    >
    > If you receive a connection warning about incompatible or nonstandard server versions, click **Continue Anyway** .

11. If the connection is successful, you receive a **Successfully made the MySQL connection** message. If you do not receive this message, check the values you specified in steps 4 to 9, and then try again.

12. Click **OK**. MySQL Workbench saves the new connection on the workspace page.

13. To open the connection, click it on the workspace page. You can now run queries, create tables, and more.

### Method #2: SSH connection

MySQL Workbench enables you to connect securely to your MySQL databases using an SSH tunnel. To do this, follow these steps:

1. Start MySQL Workbench.

2. From the workspace page, click the **+** icon next to **MySQL Connections**. The **Setup New Connection** dialog appears.

3. In the **Connection Name** text box, type a name for the connection.

4. In the **Connection Method** list box, select **Standard (TCP/IP) over SSH**.

5. In the **SSH Hostname** text box, type `example.com:22`, where *example.com* represents your domain name.

   > 🚧 Important
   >
   > Make sure you use the correct SSH port number for your account. For example, some hosting accounts use a different port for SSH, such as 7822.

6. In the **SSH Username** text box, type your hosting.com (cPanel) account username.

7. In the **MySQL Hostname** text box, type `localhost`.

8. Confirm that the **MySQL Server Port** text box is set to **3306**.

9. In the **Username** text box, type one of the following usernames:

   * **Your hosting.com (cPanel) account username:** With this username, you can access all of the MySQL databases on your hosting account.

   * **A MySQL database username you created in cPanel:** With this username, you can access all of the MySQL databases for which the specified user has been granted privileges.

10. Click **Test Connection**. The **Open SSH Tunnel** dialog box appears.

11. In the **Password** text box, type your hosting.com (cPanel) account password.

    > 👍 Tip
    >
    > To have MySQL Workbench remember your password, select the **Save password in keychain** check box.

12. Click **OK**. The **Connect to MySQL Server** dialog box appears.

13. In the **Password** text box, type the password for the username you specified in step 9.

    > 👍 Tip
    >
    > To have MySQL Workbench remember your password, select the **Save password in keychain** check box.

14. Click **OK**. If the connection is successful, you receive a **Connection parameters are correct** message. If you do not receive this message, check the values you specified in steps 3 to 9, and then try again.

15. On the **Setup New Connection** dialog box, click **OK**.

16. You can now run queries, create tables, and more. For example, from the workspace page, under **Open Connection to Start Querying**, double-click the connection name you specified in step 3. MySQL Workbench connects to your account and displays your databases.

## More information

To download MySQL Workbench and view the online documentation, please visit [http://dev.mysql.com/downloads/tools/workbench](http://dev.mysql.com/downloads/tools/workbench).

## Related articles

* [Remote MySQL connections](/docs/remote-mysql-connections)

* [Configuring remote MySQL access](/docs/remote-mysql-access)

* [Connecting to MySQL from the command line](/docs/connect-to-mysql-from-the-command-line)

* [Managing MySQL databases, users, and tables from the command line](/docs/managing-mysql-databases-and-users-from-the-command-line)
