How to Connect to the MySQL Database Remotely

Allowing remote MySQL connections is often done to enable a program on your personal computer to access a database on the server.

If you are connecting from your home computer, you need a MySQL client likeNavicatphpMyAdminWorkbench or Dreamweaver.

Configuration Settings

Use the following configuration settings for connecting to your database:

Host name = (use the server IP address)
Database name = (cpanelUsername_databaseName)
Database username = (cpanelUsername_databaseUsername)
Database password = (the password you entered for that database user)
MySQL Connection Port = 3306
TCP or UDP, either is fine.

Enable Your Computer as an Access Host

By default, all IPs are blocked and must be added to an access list in order to access the server. So, before connecting to MySQL from another computer, the connecting computer must be enabled as an Access Host.

If you do not know your IP address, find it by going to Real web

Dynamic IP Addresses

Having a dynamic IP address means that the connecting IP address can change periodically, depending on the Internet Service Provider (ISP). You must update the connecting IP in Remote MySQL every time it changes.

Many of our servers block port 3306 inbound. If you are getting a "Connection Refused" error when trying to connect, please contact us viaphone or Live Chat requesting that we open port 3306 for your IP to be able to connect to MySQL remotely.

When Using cPanel X3 Theme

  1. Log into cPanel.
  2. Under Databases, click the Remote MySQL icon.
  3. In the Host field, type in the connecting IP address.
  4. Click Add Host.

You should now be able to connect remotely to your database.

When Using cPanel X Theme

  1. Log into cPanel.
  2. Under Databases, click the MySQL Databases icon.
  3. Scroll all the way to the bottom and type in the connecting IP address in the Host field.
  4. Click Add Host.

You should now be able to connect remotely to your database.


If you have Windows hosting, you will need to whitelist your IP. Please follow the instructions in the following articles:

Accessing Your Databases

After whitelisting your local IP, you should be able to make the proper remote MySQL connection. Be sure that the username you use matches the username created in the My SQL database section of cPanel. The most common problem in connecting is due to the use of an incorrect username and password.

Removing an Access Host

To remove a host from accessing databases on your server:

  1. In Remote MySQL, click the X icon next to the IP address of the user you wish to remove.
  2. If you are sure you wish to remove the IP address as an access host, clickRemove Access Host.


  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is the Difference between Parked, Addon and Subdomains?

Subdomain A subdomain is a second website with its own unique content, but there is no new...

I already own a hosting package and want to add a 2nd domain.

Please remember that a Hatchling plan cannot add a second domain for hosting. Even domain aliases...

How to View Website Statistics in cPanel Using AWStats

When you have a website online, you may want to keep track of how many people are visiting your...

How to Upload a File using the File Manager

You can upload your files directly through cPanel using the File Manager. File Manager is a web...

Powered by WHMCompleteSolution