How to connect to a database with MySQL Workbench

How to connect to a database with MySQL Workbench

Below we explain step by step how to establish a connection to your MySQL database using MySQL Workbench, including the necessary screenshots to guide you through the process.

1. Download and installation of MySQL Workbench
MySQL Workbench is a free tool that allows you to visually manage MySQL databases. You can download the latest version from the following link: 


Download the version corresponding to your operating system and install it.

2. Obtain the connection details from your cdmon panel
To connect, you will need your MySQL connection details. All of them can be found inside the cdmon panel. Below is exactly where to find each one.

Host / Hostname (Web IP)
  1. You must use the web IP of your service.
  2. You can find it by going to:
    1. Hosting management → Hosting information → Web IP
    2. In this section you will see the public IP assigned to your hosting. This is the value you must enter in “Hostname”.



MySQL User
  1. This is the user you will authenticate with to access the database.
  2. You can find it at:
    1. Hosting management → Databases → MySQL users
    2. Here you will see the list of created MySQL users. Select the one you use to access your database.


MySQL Password
  1. The password is associated with a MySQL user.
  2. You can manage it from:
    1. Hosting management → Databases → MySQL users
    2. The password cannot be viewed. You can only generate or regenerate a new one. When you generate it, copy that value: it will be the password you must enter in Workbench.

Database
  1. This is the name of the database you will connect to.
  2. You can check it by going to:
    1. Hosting management → Databases → MySQL
    2. There you will see the list of databases available in your hosting.

Port
  1. The MySQL port is 3306.


NOTICE: The “External access” toggle must be enabled to connect through Workbench.

3. Open MySQL Workbench
  1. When you open Workbench, you will see the main screen displaying the MySQL Connections section.


4. Create a new connection


In MySQL Connections, click the + button to create a new connection.


The Setup New Connection window will open. Fill in the following fields:

  • Connection Name: the name you want to save it under
  • Hostname: the Web IP
  • Port: 3306
  • Username: your cdmon panel’s MySQL user


Click OK. Workbench will ask for the MySQL password.

5. Enter the password
  1. Enter the password generated from MySQL users.
  2. Check Save password in vault if you don't want to enter it every time.


  1. Click OK.

6. Connection created

You will now see your new connection on the Workbench main screen.

Click on it to access.

7. Database exploration

On the left panel you will see:
  1. Databases (schemas)
  2. Tables
  3. Views
  4. Procedures
  5. Functions


From here you can browse and work with your data.


For more information, you can contact us.
    • Related Articles

    • How to set up the database in Prestashop

      PrestaShop is a popular e-commerce platform that allows you to create and manage your online stores effectively. A fundamental part of PrestaShop configuration is the correct database setup. The database stores critical information about products, ...
    • How to know which database my WordPress uses

      If you want to know which database your WordPress website is using, there are several ways to do it. Below, we provide a step-by-step guide to identify your WordPress site's database from the wp-config.php file of your WordPress: The wp-config.php ...
    • How to change the check of a database from phpMyAdmin

      The collation of a database is a crucial aspect to ensure that data is stored efficiently and accurately. In this article, we will show you how to change the collation of a database using phpMyAdmin. Before showing the steps to make this change, it ...
    • Database error: Unknown column "id" in field list

      The error you are seeing in WordPress, "WordPress database error: [Unknown column 'id' in 'field list']", refers to an unknown column in a database table. This is one of the most common causes of errors in WordPress, and it is usually due to one of ...
    • How to change the database time zone in phpMyAdmin

      During the development or lifecycle of your online project, you may need to adjust the time zone of web applications to ensure that dates and times are handled correctly. In this guide, we show how to change the time zone of a database from ...