Remote Database Access can permit a trusted external host to connect to an account’s MySQL or MariaDB databases when the service allows it. Access-host approval does not replace database credentials, firewall policy or connection encryption.
IN THIS ARTICLE
What you need before you begin
Confirm remote access is supported and obtain the actual database endpoint, port and TLS requirements. Identify the client’s public egress IP, which may differ from its private network address. Prefer a stable narrowly scoped source.
01 Allow a trusted remote database connection in cPanel
- Open Remote Database Access in cPanel. Older installations may label the interface Remote MySQL.
- Add the trusted source host or exact public IP with a clear description. Avoid a wildcard that permits the whole internet.
- Create or select a dedicated database user and assign only the necessary privileges on the intended database.
- Configure the external client with the provider’s endpoint and verified TLS settings, then test a read-only query before allowing application writes.
- Remove the access-host entry and retire the credential when the integration ends. Review any source-IP change through a controlled update.
Confirm the expected result
The authorised source should connect securely, while unrelated sources remain denied. Confirm the client uses the full prefixed database and username.
Troubleshoot unexpected results
If the connection times out, check network reachability and provider policy. If authentication is denied, inspect username, password and grants. An allowlist entry cannot override a service that does not expose remote database connections.
Can I use the hostname shown in my website URL?
Only if the provider identifies it as the database endpoint. A proxied Cloudflare web hostname does not automatically carry MySQL traffic. Use the service’s documented database connection details.