How to access your database remotely (secure remote MySQL access) Print

  • 0

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

  1. Log in to DirectAdmin
  2. Go to Account Manager → MySQL Management
  3. Select your database
  4. Click Access Hosts
  5. Enter your IP address:
    123.123.123.123
  6. 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)

  1. Open MySQL Workbench
  2. Click New Connection
  3. Enter:
    Hostname: yourdomain.com
    Port: 3306
    Username: username_dbuser
    Password: (click “Store in Keychain”)
        
  4. Click Test Connection
  5. 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).

Was this answer helpful?

« Back