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 during the process.
1. Download and installation of MySQL Workbench
MySQL Workbench is a free tool that allows you to manage MySQL databases visually. 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 data from your cdmon panel
To connect you will need the MySQL connection data. All of them are available within the cdmon panel. Below we explain exactly where to locate each one.
Host / Hostname (Web IP)
- You must use the web IP of your service.
- You can find it by going to:
- Hosting management → Hosting information → Web IP
- In this section you will see the public IP assigned to your hosting. This is the value you must enter in “Hostname”.
MySQL user
- This is the user you will authenticate with in the database.
- You can find it in:
- Hosting management → Databases → MySQL Users
- Here you will see the list of MySQL users created. Select the one you use to access your database.
MySQL password
- The password is associated with a MySQL user.
- You can manage it from:
- Hosting management → Databases → MySQL Users
- 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
- This is the name of the database you will connect to.
- You can check it by accessing:
- Hosting management → Databases → MySQL
- There you will see the list of databases available in your hosting.
Port
- The MySQL port is 3306.
NOTICE: The "External access" button must be enabled to connect using Workbench.
3. Open MySQL Workbench
- When opening Workbench you will see the main screen, where the MySQL Connections section appears.
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 with
- Hostname: the web IP
- Port: 3306
- Username: the MySQL user from your cdmon panel
Click OK. Workbench will ask for the MySQL password.
5. Enter the password
- Enter the password generated from MySQL Users.
- Check Save password in vault if you do not want to enter it each time.
- Click OK.
6. Connection created
Now you will see your new connection on the main Workbench screen.
Click on it to access.
7. Database exploration
In the left panel you will see:
- Databases (schemas)
- Tables
- Views
- Procedures
- Functions
From there you can browse and work with your data.
Related Articles
How to enable external access to a MySQL database
For management reasons related to your website, you may have systems configured that need to access the hosting database to perform modifications. In order to allow these external connections, it is necessary to enable access from the cdmon Control ...
How to create MySQL databases
The use of dynamic pages or content management systems requires the use of MySQL databases. These databases can be created from the cdmon control panel. To create a database, first access the hosting management section. Once you access the hosting ...
How to connect to MySQL via SSH
Any hosting that has SSH access enabled can connect to MySQL via console. To do so, you must use the following command: mysql -h ipweb -u databaseuser -p -h: In this option, enter the web IP of the hosting. You can check the IP in the Server ...
How to import a database by SSH
Before starting, it is important to mention that not all hosting plans provide SSH access. To follow this guide, you will need a plan that includes this feature. The available plans are the Senior plans or higher. You can check our comparison table ...
How to create MySQL secondary users
Domain migration You can create secondary MySQL users from the control panel. This allows you to distribute management tasks among different users, assigning different permissions individually to each database. If you need to view, modify, or delete ...