localhost). If you need an external server (a separate web application, a development machine, or a third-party service) to connect to your database, you have to whitelist its IP address first.
Add a remote host
Open the Remote Database Access settings
Log in to cPanel through your client area or at
yourdomain.com/cpanel. Go to Databases > Remote Database Access (called Remote MySQL in older cPanel versions).Enter the IP address or hostname
In the Host field, enter the IP address (IPv4 or IPv6) or hostname of the server that needs access.
Add an optional description
In the Comment field, add a note to remind yourself what this host is for (e.g. “Staging server” or “Office IP”). This is optional but helpful when you have multiple entries.
localhost) as the database host.
Use wildcards
You can use the% character as a wildcard to allow a range of IP addresses:
| Entry | What it allows |
|---|---|
192.168.1.% | Any IP from 192.168.1.0 to 192.168.1.255 |
10.0.% | Any IP starting with 10.0. |
% | Any IP address (not recommended) |
Edit a host description
In the Manage Access Hosts section, find the entry you want to update. Change the text in the comment field and click Update.Remove a remote host
To revoke access for a remote host:- In the Manage Access Hosts section, click Delete next to the host you want to remove.
- Click Remove Access Host to confirm.
Security considerations
- Only whitelist IP addresses you actually need. Remove entries when they’re no longer in use.
- Use a specific IP address rather than a wildcard whenever possible.
- Make sure the database user connecting remotely has only the privileges it needs — don’t grant ALL PRIVILEGES if the application only reads data.
- Remote database connections are not encrypted by default. If you’re connecting over the public internet, consider using an SSH tunnel to encrypt the connection.