cPanel & WHM offers a complete MySQL management solution to automate common web hosting database tasks. 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. But by default, Remote MySQL connections are disabled in cPanel servers because they are considered a potential security threat.
Let's now check how cPanel/WHM users can configure a remote MySQL database.
Configuring a Remote MySQL from WHM
- Login to WHM.
- Search SQL Services section. Once located, click on the Additional MySQL Access Hosts link.
- On the next screen, enter the IP address you wish to grant remote MySQL access and click the Save button.
Note: If you want to activate these settings for all cPanel accounts, click on Click Here link at the bottom.
Now, the remote connection has been activated in WHM. Each cPanel account that wants to use a remote connection must start.
Configuring a Remote MySQL Database with cPanel
- Log in to cPanel.
- Look for the Databases section. Under the Databases section, locate the Remote MySQL option and click on it.
- Now a new page appears, Add Access Host form in the browser. Here, you need to enter the domain name or IP address of the web application's server. You can add multiple IP addresses to access the database using a wildcard (%); for example, 126.96.36.199%.
- Click the Add Host button, and cPanel configures the MySQL database to accept requests from the remote site.
Next, you should configure the site to use the remote database. The process differs depending on the application.