> ## Documentation Index
> Fetch the complete documentation index at: https://speedypage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Remote database access

> How to allow external servers to connect to your MySQL databases by whitelisting their IP addresses in cPanel.

By default, your MySQL databases only accept connections from your hosting server (`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

<Steps>
  <Step title="Open the Remote Database Access settings">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Databases** > **Remote Database Access** (called **Remote MySQL** in older cPanel versions).
  </Step>

  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="Save">
    Click **Add Host**.
  </Step>
</Steps>

The remote server can now connect to any MySQL database on your account using a valid database username and password. The connection uses your server's hostname or IP address (not `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)             |

<Warning>
  Using `%` to allow all IP addresses means anyone on the internet can attempt to connect to your databases (they still need valid credentials, but you lose the IP-level protection). Only use broad wildcards if you fully understand the risk.
</Warning>

## 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:

1. In the **Manage Access Hosts** section, click **Delete** next to the host you want to remove.
2. Click **Remove Access Host** to confirm.

The remote server will no longer be able to connect to your databases.

## 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.

<Tip>
  Not sure what IP address your remote server uses? Run `curl ifconfig.me` on the server to find its public IP, or check with the provider of the service that needs to connect.
</Tip>

For help managing your databases and users, see [Manage MySQL databases](/web-hosting/manage-databases).
