# Configuring remote MySQL access in cPanel

> Connect to your hosting database from your own computer, another server or an app, by allowing your IP address in cPanel's Remote Database Access.

Source: https://helpcenter.ruachost.com/cpanel/databases/configuring-remote-mysql-access-in-cpanel/

By default, your databases only accept connections from your hosting account itself (`localhost`). To connect from somewhere else, for example a desktop tool like MySQL Workbench or DBeaver, a reporting tool, or an app on another server, allow that computer's IP address first.

> **Note:**
Your website doesn't need this. Websites hosted on your Ruachost account always connect using `localhost`.

## Step 1: Allow your IP address

1. Find the public IP address of the computer or server that will connect. On your own computer, search "what is my IP".
2. Log in to cPanel and open **Remote Database Access** (called **Remote MySQL®** in some versions) under **Databases**.
3. Enter the IP address in **Host**, add a note such as "Office PC", and click **Add Host**.

You can also enter a range with a `%` wildcard, for example `102.89.%`, if your IP address changes within a range. Avoid allowing `%` on its own: that lets anyone on the internet try to log in.

## Step 2: Connect

Use these details in your database tool or app:

| Setting | Value |
| --- | --- |
| **Host** | Your server's hostname or IP address (shown in cPanel under **General Information**), or your domain name |
| **Port** | `3306` |
| **Database** | The full database name, e.g. `cpuser_shop` |
| **Username** | The full database username, e.g. `cpuser_shopuser` |
| **Password** | That database user's password |

See [Finding your database details](https://helpcenter.ruachost.com/cpanel/databases/finding-your-database-details/).

## If the connection times out

- Check that the IP address you added is the one you're connecting **from**. Many home and mobile connections change IP address regularly, so you may need to add the new one.
- Some office and public networks block outgoing connections on port 3306. Try another network.
- If it still times out, [open a support ticket](https://dashboard.ruachost.com/submitticket.php) with your IP address and we'll check the server firewall.

**"Access denied"** means the connection reached the server but the username or password is wrong, or the user hasn't been added to the database. See [Managing MySQL databases and users](https://helpcenter.ruachost.com/cpanel/databases/managing-mysql-databases-and-users/).

## Remove access when you're done

In **Remote Database Access**, click **Delete** next to any IP address that no longer needs access. Fewer allowed addresses means a safer database.

## Related articles

- [Using MySQL client applications](https://helpcenter.ruachost.com/developers/databases/using-mysql-client-applications/)
- [Connecting to MySQL from the command line](https://helpcenter.ruachost.com/developers/databases/connecting-to-mysql-from-the-command-line/)
