1. Home
  2. Hosting Management
  3. MySQL Databases
  4. How to Configure Remote Access to MySQL Database in cPanel

How to Configure Remote Access to MySQL Database in cPanel

General information

In this article, we will shed some light on a very useful feature. One of the most useful features of cPanel is the ability to enable remote access to your MySQL Databases.

This is important because some third party applications or web developers, for example,  might need access to your database from their server or their local computer. In order for them to do this securely, you need to add their IP Addresses to a whitelist. Additional privileges might be needed to allow further changes to the databases. In this case, you should contact your hosting provider and let them know exactly what you need.

How to Configure Remote Access to MySQL Database

Here is how you go about doing this.

1. Log in to your cPanel account.

2. Navigate to the Database section and click on Remote MySQL ® .

3. In the Add Access Host box, you need to enter each individual IP Address and click on Add Host. You can get your own IP address at ip4.me. If your web developer is the person who requires access, ask them to visit that URL and to provide you with their own IP address.

Bellow this section you will see a list with all the added access hosts (or IPs). You can also remove IP addresses, if needed.

Another interesting feature is the possibility to add the “%” wildcard. This allows you to add an entire IP range to the access hosts list. While it may seem like an easy “fix”, the usage of the % is not advisable, as it presents some security risks.

Make sure you always take into account the security issues when allowing third-party IP Addresses access to your database. This type of vulnerability may be exploited by people looking to steal sensitive or proprietary customer information.

How to connect remotely to MySQL Database using MySQL Workbench

MySQL Workbench is a visual tool for database architects and developers. MySQL Workbench provides data modeling, SQL development, and comprehensive database administration tools, and much more. MySQL Workbench is available on Windows, Linux, and Mac OS X. You can download it here.

Once MySQL Workbench is installed, please follow the steps below to connect to your database:

  1. Open MySQL Workbench.
  2. Click New Connection towards the bottom left of MySQL Workbench.
  3. In the “Set up a New Connection Dialogue” box, Type your Database connection credentials. The credentials will be like the following:Connection Name: You can name this whatever you like.
    Connection Method: Standard (TCP/IP).
    Hostname: You can use your domain our your server’s IP address.
    Port: 3306
    Username: the user you created for the database.
    Password: the password for the database user that was created.
    Default Schema: This can be left blank.
  4. Click Test Connection.
  5. Type your password and click the “Save Password in Vault” checkbox. Click Ok.
  6. MySQL Workbench should say “Connection parameters are correct“. Click Ok.
  7. Click Ok again to accept the connection settings.
  8. Now under the SQL Development section, you will see your connection listed in the Open Connection to Start Querying box. Click your newly created account.
  9. Now you will see the databases list in the area on the left.

That’s all! Now you know how to connect remotely to your MySQL database.

Updated on August 8, 2020

Was this article helpful?

Related Articles

TRY CHEMICLOUD RISK-FREE
Fast, secure cloud hosting. 18 global data centers. Unhappy with your web host?
👉 Migrate for Free

Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.