---
title: "Allow remote connections to your database"
url: "https://inleed.com/helpcenter/allow-remote-database-access"
language: "en"
updated: "2026-11-06"
category: "Web hosting"
type: "guide"
---

# Allow remote connections to your database

To reach the database from your computer or a service outside your hosting, your IP address has to be added to the database user.

## Right guide?

- Does your website show `Error establishing a database connection`?  
  [My website can’t connect to the database](https://inleed.com/helpcenter/cant-connect-to-database)

## Before you start

- You need the public IP address you’ll connect from. It’s shown on [ip.inleed.se](https://ip.inleed.se).

## How to allow it

1. Log in to [DirectAdmin](https://inleed.com/helpcenter/log-in-to-directadmin) and open **Databases**.

2. Click **Manage Users**.

3. Click **Manage** next to the database user.

4. Enter your IP address under **Allow access from** and click **Add Host**.

## How to know it worked

You can connect to the database from that IP address.

## Good to know

- The website on your hosting should keep using `localhost` as the database server.
- Forgotten the database user’s password? Change it under **MANAGE USERS**. If the website uses the same user, enter the new password in `wp-config.php` too.

## Related guides

- [My website can’t connect to the database](https://inleed.com/helpcenter/cant-connect-to-database)
- [Create a database and a database user](https://inleed.com/helpcenter/create-database)
- [Export a database](https://inleed.com/helpcenter/export-database)
