How to allow remote access to a MySQL database Print

  • 0

By default, only websites on your hosting account can connect to your MySQL databases. If you need to connect from somewhere else, for example a desktop tool like MySQL Workbench on your computer, allow that computer's IP address first.

Allow an IP address

  1. Find your public IP address. Search "what is my IP" in your browser.
  2. In cPanel, open Databases → Remote Database Access.
  3. Under Host, enter your IP address and optionally a comment such as "My office".
  4. Click Add Host.

Adding an IP address in Remote Database Access

Connect

Hostyourdomain.com (or your account's IP address)
Port3306
User / Passwordyour database user, e.g. username_shopuser and its password
Databasee.g. username_shop
Security tip: only add the specific IP addresses you need and remove them when you're done. Avoid the % wildcard, which allows connections from anywhere.

Doesn't connect?

  • Your IP address may have changed. Many home connections get a new IP now and then. Check it again and update the entry.
  • If your domain uses a proxy (for example Cloudflare), connect using the IP address instead of the domain name.
  • Some office and public networks block port 3306.

Was this answer helpful?

« Back