Skip to content
cPanel: Remote MySQL connections (Remote Database Access)
cPanel

cPanel: Remote MySQL connections (Remote Database Access)

11580 views

By default, MySQL/MariaDB databases only accept connections from the server itself. If you want to connect from your computer or another server (e.g. with HeidiSQL, MySQL Workbench or an application), you need to allow its IP address.

Steps

  1. Log in to cPanel with Login to Panel (see cPanel: Logging in).
  2. Go to Databases → Remote Database Access (called Remote MySQL in older versions).
  3. In Host, enter the IP address (or hostname) you'll connect from. You can use % for a range, e.g. 192.168.0.%.
  4. Optionally add a Comment to remember what it is.
  5. Click Add Host.

Connection details

  • Server: your domain or the server's IP.
  • Port: 3306.
  • User and password: the database user (from MySQL Databases), not your cPanel password.

Security: add only the IPs you need and remove the ones you no longer use. Avoid a bare %, which opens the database to the whole internet.

Was this answer helpful?