How to Enable Remote MySQL Connections in cPanel

70 views
Short answer: Open cPanel Remote MySQL, add your local workstation static IP or external application server IP to the Access Hosts list, and connect remotely on port 3306.

Connect desktop database management tools like DBeaver, Navicat, and HeidiSQL to your cPanel MySQL database over port 3306 by whitelisting IP addresses.

Quick reference

Tool Location cPanel > Databases > Remote MySQL
MySQL Port 3306 (TCP)
Access Host Format Single IP (e.g. 198.51.100.45) or Subnet (198.51.100.%)
Security Policy Never enter % on its own, because it allows every IP address

Steps

  1. Identify Your Public IP Address: On your local computer, visit whatismyipaddress.com and copy your IPv4 address.
  2. Open Remote MySQL: In cPanel, navigate to Databases > Remote MySQL.
  3. Whitelist Your IP:
    • In the Host (% wildcard is allowed) field, enter your public IP address.
    • Add a descriptive comment (e.g., Office Desktop).
    • Click Add Host.
  4. Connect from Desktop Client (e.g., DBeaver or Navicat):
    • Host: Enter your domain name or server IP.
    • Port: 3306.
    • Database: Enter the full database name (e.g., cpaneluser_dbname).
    • Username: Enter the full database user (e.g., cpaneluser_dbuser).
    • Password: The database user's password.

Troubleshooting and tips

  • Error 2003: Can't connect to MySQL server (10060): Confirm that your public IP has not changed (if using dynamic home internet). Whitelist your new IP in cPanel. Also ensure your local router or company firewall allows outbound connections on port 3306.
  • Security Warning: Never enter % (allowing all internet IPs). Imunify360 firewall monitors port 3306 and will block aggressive connection attempts from unwhitelisted IPs.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket