Woman viewing a database dashboard on a large desktop monitor in a modern office.

How to use MySQL Workbench to connect to a database

Key takeaways

  • MySQL Workbench connects to local or remote databases using the right method, host, port, username, and password.
  • Most connections use Standard TCP/IP, while secure remote setups may require IP safelisting, SSH, or both.
  • Server-side access must be configured before you test the connection in Workbench.
  • Confirm credentials, access rules, and connection method first to avoid common errors.

MySQL Workbench provides a desktop interface for connecting to MySQL databases, including remote databases hosted outside your local machine.

In cases where you don’t want to give the developer too much access to the Nexcess Client Portal, you can install a remote MySQL client like MySQL Workbench to connect to the database remotely.

Note that by default, the Nexcess Client Portal gives you access to your databases using phpMyAdmin.

Ready to get started?

Get high-performance VPS hosting that delivers unrivaled power.

What you need before you connect

Before you open MySQL Workbench, collect the details your connection requires. This saves time and helps you avoid failed connection attempts caused by missing access, incorrect credentials, or blocked ports.

The following items are the prerequisites needed:

  1. You will want MySQL Workbench installed on your local machine. Next, visit the MySQL Workbench Downloads page to download the installer for your operating system. It’s available for Windows, macOS, Ubuntu Linux, RedHat Linux, and Fedora.
  2. You will need the Public IP address of the MySQL Server, which is also the Hosting IP of the website.
  3. You will need the database username and password for the MySQL account that you wish to connect.
  4. You should safelist (also called “whitelisting”) your local machine’s IP address against the MySQL Port.

You may also need:

  • The MySQL port, usually 3306
  • The database name or default schema
  • Confirmation that remote MySQL access is enabled
  • Firewall access for your current IP address
  • SSH username, SSH password or key, SSH hostname, and SSH port if you plan to connect through an SSH tunnel

What is MySQL Workbench?

The MySQL Workbench provides a graphical user interface for working with SQL servers and databases. You can use it to create entity relation diagrams, manage servers, and run SQL queries.

In addition to being developed and maintained by Oracle, MySQL Workbench is cross-platform, meaning it operates on Windows, Linux, and Mac OS X.

MySQL Workbench helps users connect to MySQL databases, browse schemas and tables, run SQL queries, manage users, import and export data, and review server performance from one desktop application.

How to create a new MySQL Workbench connection

Here’s a step-by-step guide on how to use MySQL Workbench:

1. Install MySQL Workbench

If you don’t have it, you can download it here. Select the version that fits your operating system.

2. Get database credentials information

To connect to the MySQL Workbench, you will need the Hostname/IP and the Database Username connected to the MySQL database and its password.

If you host with Liquid Web or Nexcess, check your hosting control panel or Client Portal for the database hostname, IP address, username, and password. The exact location depends on your hosting product and control panel.

3. Safelist your IP address

You will need to safelist your local machine IP on the Nexcess Firewall against the MySQL Port.

Safelisting allows your computer to reach the MySQL service from your current public IP address.

If you are on a WordPress hosting/WooCommerce plan, don’t hesitate to contact the Nexcess Support Team to safelist your IP for remote MySQL connections. Also, if you have a dynamic IP, you will need to safelist your IP address each time it changes.

4. Open MySQL Workbench

Open MySQL Workbench on your computer.

To start a new connection to a database, click on the + button.

5. Enter a connection name

A new window named Setup New Connection will appear. Then, you can fill in the necessary account information.

Connection Name – It can be something similar to “database_for_example.com” or something more descriptive to help you identify the connection you’re making later.

Choose a name that helps you recognize the site, environment, or project later. For example, use names like store-production, client-site-staging, or example.com database.

6. Choose the connection method

Most basic MySQL Workbench connections use Standard TCP/IP.

Connection Method – Leave it as the default, Standard (TCP/IP).

Use Standard TCP/IP over SSH when the database should not accept direct remote MySQL connections or when your hosting setup requires an SSH tunnel for safer access.

7. Enter the hostname, port, and username

Fill in the connection fields carefully.

FieldWhat to enter
HostnameUse localhost or 127.0.0.1 for a local database, or use the server IP address or hostname for a remote database
PortUse 3306 unless your server uses a custom MySQL port
UsernameEnter the MySQL database username
PasswordStore or enter the MySQL user’s password
Default schemaLeave blank unless you want Workbench to open a specific database by default

Hostname – Enter your website’s Hosting IP address here.

Port – Leave it as the default (3306).

Username – Database Username.

Password – Click on Store in Keychain and add your database user’s password.

Default Schema – Can be left blank.

8. Save the password securely

MySQL Workbench can store credentials so you don’t need to enter the password every time you connect.

Use your system’s secure credential storage, such as Keychain on macOS or the available vault option in Workbench, when appropriate. Avoid saving passwords on shared computers.

9. Test the connection

Verify your settings by choosing Test Connection.

If MySQL Workbench returns an error, avoid changing fields at random. Confirm the hostname, port, username, password, safelisted IP, firewall rules, and connection method.

10. Save and connect

Choose OK to create the connection.

After saving, click the connection tile from the MySQL Workbench home screen to open the database connection.

Standard TCP/IP vs. Standard TCP/IP over SSH

MySQL Workbench supports multiple connection methods. For most hosting users, the decision usually comes down to Standard TCP/IP or Standard TCP/IP over SSH.

Connection methodBest forWhat you need
Standard TCP/IPLocal databases or remote databases that allow direct MySQL access from your IPMySQL hostname, port, username, password, and allowed remote access
Standard TCP/IP over SSHRemote databases where you want or need traffic to pass through an SSH tunnelSSH hostname, SSH username, SSH password or key, MySQL hostname, MySQL port, and MySQL credentials

When Standard TCP/IP is enough

Standard TCP/IP may work when your database server accepts remote MySQL connections and your local IP address has permission to connect through the firewall.

This setup requires careful access control. Safelist only the IP addresses that need database access, and remove access when a developer, vendor, or temporary user no longer needs it.

When to use Standard TCP/IP over SSH

Standard TCP/IP over SSH can add a safer connection path by sending database traffic through an SSH tunnel instead of exposing MySQL access broadly.

Use this method when your hosting environment requires SSH access for remote database work, when direct MySQL access remains blocked, or when your team wants tighter control over how database connections reach the server.

How to connect to a remote database in MySQL Workbench

Remote database connections require settings in both places: MySQL Workbench on your computer and the server or hosting account that controls access to the database.

Before testing the connection, confirm that the database user can connect remotely, the firewall allows access from your current IP address, and the MySQL service listens on the expected port. 

If your hosting environment separates the web server from the database server, use the database server hostname instead of the website hostname.

Common MySQL Workbench connection errors and fixes

Connection errors often come from missing prerequisites rather than a problem with MySQL Workbench itself.

Error or symptomLikely causeWhat to check
MySQL Workbench cannot connect to serverMySQL service is not running or the host is unreachableConfirm the server is online and MySQL is running
Access denied for userIncorrect username, password, host, or user permissionsRecheck credentials and confirm the MySQL user has the right privileges
Host is not allowed to connectYour IP address or host has not been allowed for remote MySQLSafelist your current public IP address
Connection timed outFirewall, network, or port access blocks the connectionCheck firewall rules, hosting access rules, and port 3306
Port 3306 blockedProvider blocks inbound MySQL traffic by defaultAsk support to allow access from your IP or use SSH if supported
SSH connection failsIncorrect SSH hostname, username, password, key, or portRecheck SSH credentials and confirm SSH access
Password prompt keeps appearingPassword was not saved or the saved password is incorrectUpdate the saved password in Workbench or enter it again
SSL errorThe server requires SSL or the SSL settings do not matchConfirm whether SSL is required and add the correct SSL settings

If the connection keeps failing, have the Nexcess Support Team check whether your IP address has been allowed and ensure your credentials are correct.

Alternatively, you can use a SSH Gateway to securely and efficiently run MySQL commands on your website if you still experience connection issues.

Security tips for MySQL Workbench connections

Remote database access can make development and administration easier, but it also needs limits.

Despite being able to open MySQL to remote connections and to prevent possible security breaches, you should grant privileges to selected users only. Additionally, ensure the users are using very strong passwords. Keeping the MySQL server software up-to-date should help too.

Use these security basics when connecting with MySQL Workbench:

  • Limit access to selected users only
  • Safelist only the IP addresses that need access
  • Use strong, unique passwords
  • Use SSH or SSL where appropriate
  • Keep MySQL and MySQL Workbench updated
  • Review database user privileges regularly
  • Remove remote access when a user or vendor no longer needs it

What you can do after connecting

After you connect to the database, MySQL Workbench gives you tools for development, administration, and data management.

Once you’ve successfully connected to the database, you can view and edit the MySQL Database Instance details under the Administration area to the left of the navigation bar:

  • Database Configuration
  • Database Status
  • Server Status
  • Performance Dashboard
  • Current Connections

It also allows you to view users and their permissions. In addition to backing up and restoring databases, MySQL Workbench supports importing and exporting MySQL dump files.

The Schemas area on the left navigation bar is where you can find the databases listed. With a dropdown arrow next to each database, you can expand your database tables and objects.

From this area of MySQL Workbench, you can view table data, run complex queries, and edit data.

How to connect two databases in MySQL Workbench

MySQL Workbench can store multiple saved connections. If you need to work with two databases, the right setup depends on where those databases live.

If both databases exist on the same MySQL server, create one connection to that server and use the Schemas panel to open each database.

If the databases live on different servers, create a separate saved connection for each server. Each connection can have its own hostname, port, username, password, SSH settings, and default schema.

Connecting to multiple databases gives you access to separate schemas or saved server connections based on your user permissions. It does not combine the databases into one environment.

MySQL Workbench FAQs

Create a new connection, enter the required database details, choose the right connection method, and use Test Connection before saving.

Use Standard TCP/IP for direct local or remote access. Use Standard TCP/IP over SSH when the connection should pass through an SSH tunnel.

Connection issues usually come from incorrect credentials, blocked access, firewall rules, missing IP safelisting, or a MySQL service issue. Use the troubleshooting table above to narrow down the cause.

Yes, in many hosting environments. Safelisting tells the server or firewall which IP addresses can connect to MySQL remotely. If your IP address changes, you may need to update the safelist before MySQL Workbench can connect again.

MySQL uses port 3306 by default. Port 1433 commonly applies to Microsoft SQL Server, not MySQL.

Use one connection for databases on the same server, or create separate saved connections for databases on different servers.

Yes, the MySQL Workbench Community Edition is free and available for multiple platforms, including Microsoft Windows, macOS, and Linux.

Getting started with MySQL Workbench

A successful MySQL Workbench connection depends on two things: the right desktop settings and the right server-side access setup.

Start by collecting your host, port, username, password, connection method, and remote-access requirements before opening Workbench.

Liquid Web managed hosting gives your team the support, security guidance, and hosting infrastructure needed to manage databases without overexposing access. Explore Liquid Web managed hosting to find a hosting environment that supports secure database administration.

Ready to get started?

Get high-performance VPS hosting that delivers unrivaled power.

Related articles

Wait! Get exclusive hosting insights

Subscribe to our newsletter and stay ahead of the competition with expert advice from our hosting pros.

Loading form…