Enable Remote MySQL Connections in cPanel

Remote MySQL connections are disabled by default in cPanel servers because they are considered a potential security threat. Using the tools in the Web Host Manager (WHM) and the domain-level cPanel interface (usually http://domainname.com/cpanel) remote hosts can be added which the server allows to connect to the MySQL service.

Before using either of the following techniques, you will need to to open up port 3306 in your server’s firewall.

 

Enabling Remote MySQL in the WHM Interface

Log in to the server’s WHM interface and find the section in the left-side navigation bar labeled SQL Services. You can sort the list by typing ‘sql’ in the search box. Click on the link marked Additional MySQL Access Hosts:

WHM - Remote MySQL List

On the following page, enter one or more hosts or IP addresses in the text box (1) and click the Save button (2). If you wish to activate these settings on all user accounts see (3).

WHM - Remote MySQL page

Now that the remote connection has been activated in the WHM each domain account that wants to use the remote connection will need to activate it in their own cPanel interface.

Enabling Remote MySQL in the Domain cPanel Interface

Log in to the domain’s cPanel interface and find the section on the main page labeled Databases.

In the Databases section find the link/button labeled Remote MySQL and click on it.

cPanel - Remote MySQL list

The following page will appear in your browser. Add a hostname or IP address that you want to grant remote MySQL access to (1) and then click the Save button (2).

If a host or IP address needs to be removed from this list you can click the ‘Delete’ button next to the entry in the list.

cPanel-page-fxt

Once you have made your changes, additions, or removals to the list you can return the main page of the cPanel interface, or log out if you have no other tasks to take care of.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Modifying the htaccess file to use a custom php.ini file throughout your website

This guide provides instructions for modifying .htaccess to use a custom php.ini throughout your...

Customise the php.ini file settings in Code Editor

1. Log in to cPanel, if you haven’t already done so 2. If you haven’t already done so, create a...

Creating a new php.ini file

If you do not have a php.ini file in your public_html folder you can create one by following the...

My e-mail is going to the bulk or spam folder!

You can create an SPF record from cpanel > Email Authentication for your all domains that are...

I lost or forgot my cPanel or WHM password - how can I reset it?

Resetting your cPanel password and finding your cPanel username is easy and can be handled...