Overview
You can connect to your MySQL database remotely using applications like MySQL Workbench, TablePlus, DBeaver, HeidiSQL, or Visual Studio Code. To keep your server secure, DirectAdmin requires you to whitelist your IP address before allowing remote access.
Step 1 — Whitelist your IP address
- Log in to DirectAdmin
- Go to Account Manager → MySQL Management
- Select your database
- Click Access Hosts
- Enter your IP address:
123.123.123.123
- Click Add
If you want to allow access from anywhere (not recommended):
%
Step 2 — Get your database login details
Host: yourdomain.com OR server hostname Port: 3306 User: username_dbuser Pass: your DB password Database: username_dbname
Step 3 — Connect using MySQL Workbench (example)
- Open MySQL Workbench
- Click New Connection
- Enter:
Hostname: yourdomain.com Port: 3306 Username: username_dbuser Password: (click “Store in Keychain”) - Click Test Connection
- Click Connect
Security recommendations
- Never allow wildcard access (%) unless necessary.
- Use a strong database password.
- Remove unused remote IPs.
- Use SSH Tunnel if possible (most secure).