Allowing remote MySQL connections is often done to enable a program on your personal computer to access a database on the server.
Configuration Settings
Use the following configuration settings for connecting to your database:
Host name = (use the server IP address)
Database name = (cpanelUsername_databaseName)
Database username = (cpanelUsername_databaseUsername)
Database password = (the password you entered for that database user)
MySQL Connection Port = 3306
TCP or UDP, either is fine.
Enable Your Computer as an Access Host
By default, all IPs are blocked and must be added to an access list in order to access the server. So, before connecting to MySQL from another computer, the connecting computer must be enabled as an Access Host.
When Using cPanel X3 Theme
- Log into >> cPanel.
- Under Databases, click the >>Remote MySQL icon.
- In the Host field, type in the connecting IP address.
- Click >>Add Host.
You should now be able to connect remotely to your database.
When Using cPanel X Theme
- Log into >>cPanel.
- Under Databases, click the >>Remote MySQL icon.
- Scroll all the way to the bottom and type in the connecting IP address in the Host field.
- Click >> Add Host.
now you able to connect remotely to your database.
Plesk
If you have Windows hosting, you will need to whitelist your IP. Please follow the instructions in the following articles:
Accessing Your Databases
After whitelisting your local IP, you should be able to make the proper remote MySQL connection. Be sure that the username you use matches the username created in the My SQL database section of cPanel. The most common problem in connecting is due to the use of an incorrect username and password.
For more examples of common MySQL errors, please see the related article:
Removing an Access Host
To remove a host from accessing databases on your server:
- In Remote MySQL, click the X icon next to the IP address of the user you wish to remove.
- If you are sure you wish to remove the IP address as an access host, click Remove Access Host.