This article describes how to use cPanel to allow external hosts to access your MySQL databases. When remote host access is enabled, you can use remote client applications to connect to your databases directly.
- Log in to cPanel.
- In the DATABASES section of the cPanel home screen, click Remote MySQL.
- Under Add Access Host, in the Host text box, type the domain name or IP address of the host that you want to add.
- In the Comment text box, you can add an optional comment to describe the remote host.
- Click Add Host.
Enabling Remote MySQL in the WHM Interface:
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 connecting to the MySQL service.
Before using either of the following techniques, you will need to open up port 3306 in your server’s firewall.
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:
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).
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.