Skip to content

Knowledgebase

Allowing a trusted remote database connection in cPanel

cpanel-whm, development

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.

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

  1. Open Remote Database Access in cPanel. Older installations may label the interface Remote MySQL.
  2. Add the trusted source host or exact public IP with a clear description. Avoid a wildcard that permits the whole internet.
  3. Create or select a dedicated database user and assign only the necessary privileges on the intended database.
  4. Configure the external client with the provider’s endpoint and verified TLS settings, then test a read-only query before allowing application writes.
  5. 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.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution