How to Connect to a Database Using MySQL Workbench

MySQL Workbench is a graphical tool that allows you to connect to MySQL databases, run SQL queries, and manage database objects. You can use it to connect to a database running on a local machine or a remote VPS or dedicated server.

For database hosting environments, MySQL Workbench provides a convenient way to administer databases without having to run every operation from the command line. Before connecting remotely, make sure the MySQL server is running and configured to accept connections from your computer.

Requirements

Download and install MySQL Workbench on your local computer from the official website:

Download MySQL Workbench

Step 1: Open MySQL Workbench and Create a Connection

  1. Launch MySQL Workbench.
  2. Click the + icon next to MySQL Connections to create a new connection.
  3. Enter the connection details described below.

Connection Settings

  • Connection Name: Enter a name to identify this connection in MySQL Workbench. This name is for your reference and does not affect the database connection.
  • Hostname: Enter the database server's IP address or hostname.
  • Port: The default MySQL port is 3306. Change it if your server listens on a different port. For Database Mart Public Cloud environments, the configured port may be 3336; verify the actual port in your server information.
  • Username: Enter a MySQL account with the permissions required for your tasks. Although root is a common administrative account, it is better to use a dedicated account with only the necessary privileges.

The hostname and port must match your database server's configuration. If your database runs on a remote VPS, confirm that the server firewall and network rules allow connections from your local IP address.

Step 2: Test the Database Connection

  1. Click Test Connection.
  2. Enter the password for the selected MySQL account when prompted.
  3. If the connection succeeds, click OK to save the connection profile.

You can then select the saved connection from the MySQL Workbench home screen to access the database.

Important Notes for Remote Connections

Most MySQL instances restrict remote access for the root account by default. If remote connections are disabled or restricted, you may need to connect through Remote Desktop Protocol (RDP) to a Windows server and run MySQL Workbench directly on that server, or ask your database administrator to configure secure remote access.

If you need to connect from your local computer, check the following:

  • MySQL service: Confirm that the database service is running.
  • Hostname and port: Verify the server IP address or hostname and the configured MySQL port.
  • Firewall rules: Allow access only from trusted IP addresses when possible.
  • Account permissions: Ensure the MySQL account is authorized to connect from your client host.
  • Network security: Avoid exposing the database port to the entire internet. Use an encrypted connection or a secure tunnel when appropriate.

These checks are useful when managing MySQL on a VPS or dedicated server hosting platform. When choosing a hosting provider, confirm that its network and access controls support your database administration requirements.

Last Updated:   10/23/2026
Outline