By default, databases in Plesk only accept connections from the server itself (localhost). If you need to connect from an external application, a local development tool like MySQL Workbench, or another server, you'll need to enable remote access.

## Step 1: enable remote access for the database user

1. Log in to your **Plesk control panel**.
2. Go to **Websites & Domains** > **Databases**.
3. Click the **User Management** tab.
4. Click the name of the database user you want to grant remote access to.
5. Under **Access control**, choose one of these options:
   - **Allow local connections only** — default, no remote access
   - **Allow remote connections from any host** — lets anyone connect (use with caution)
   - **Allow remote connections from** — restricts access to specific IP addresses or hostnames (recommended)
6. Click **OK** to save.

## Step 2: connect from your remote application

Use these connection details in your external application or tool:

- **Host:** your domain name or server IP address
- **Port:** 3306 (default MySQL/MariaDB port)
- **Username:** the database user you configured above
- **Password:** the database user's password
- **Database:** the name of your database

## Important notes

- **Security first:** avoid "Allow remote connections from any host" whenever possible. Specify the exact IP address of the server or computer that needs access.
- **Firewall:** port 3306 must be open on your server's firewall. If connections time out, ask your hosting provider to check the firewall rules.
- **Encrypted connections:** remote MySQL connections are unencrypted by default. For sensitive data, configure SSL for your database connections.
- This setting is per-user — each database user has their own access control settings.
- If you no longer need remote access, switch back to **Allow local connections only** to reduce your attack surface.

## Testing the connection

From your local computer (if you have MySQL client installed), run:

```
mysql -u your_db_user -p -h yourdomain.com
```

Or use a GUI tool like **MySQL Workbench**, **DBeaver**, or **HeidiSQL** — enter the connection details above and click **Test Connection**.

## Troubleshooting

- **Connection refused?** The server firewall is likely blocking port 3306. Contact your hosting provider to open it.
- **Access denied?** Make sure the remote access setting is correct for that specific user, and double-check the password.
- **Connection times out?** This usually means port 3306 is blocked. Try a different network to rule out your local firewall.
- **Access control option not showing?** Your hosting plan may not include the **Remote access for database users** permission. Contact your hosting provider.