Configure the list of IP addresses or hostnames permitted to connect to your MySQL or MariaDB databases from outside the server. This procedure is performed in WHM and applies to all cPanel accounts on the server.
Before you begin
You will need:
Root access to the WHM interface
The specific IP addresses or hostnames of the remote machines that require database access
Configure Remote MySQL Access
Log in to WHM.
Navigate to SQL Services > Remote MySQL.
Locate the field for the remote host or IP address.
Enter the IP address or hostname of the remote machine.
Click Add Host.
Verify the host appears in the list of allowed remote hosts.
Warning: Allowing remote MySQL access can expose your databases to unauthorized access. Only add specific, trusted IP addresses. Avoid using a wildcard (such as %) as it allows any IP address to attempt a connection to your database.
Confirm the result
The remote host will appear in the list of allowed hosts in the Remote MySQL interface.
The remote machine can now attempt to connect to the database using the appropriate credentials.
Limitations
This setting applies to the entire server. If you only need to allow a specific user to connect from a specific location, consider using the "Add Usuer to MySQL Host" feature within the individual cPanel account's MySQL Databases section instead.
