If you use a local database management tool or connect to your database from a different server, allowing remote access to your database might be helpful for a number of reasons. Here's a quick guide on setting up remote database access in cPanel.
- Logging into cPanel
Go into your cPanel account and log in using your username and password . - Locate the Remote MySQL Option
Locate the "Databases" section once you're on the cPanel dashboard. In this section, find and click on the "Remote MySQL" icon. - Add an Access Host
In the "Remote MySQL" interface, you’ll see a field labeled "Add Access Host." Enter the IP address or domain name of the remote computer or server you want to allow access to your
database. After entering the domain name or IP address, select "Add Host." - Verify and Save Changes
After adding the access host, the IP address or domain name will appear in a list below the entry field. This means the remote access has been set up successfully. You can add multiple IP
addresses or domain names if needed. - Database users and privileges
Ensure that the database user to whom you want to connect remotely has the relevant privileges. To do so, return to the "MySQL Databases" section of cPanel. Scroll down to the "Current Users" column and select "Privileges" next to the relevant user. Check that the user has the necessary permissions for the database they will access. - Connecting Remotely
With remote access enabled, you can now connect to your database from a remote server or a local database management tool. Use the following connection details:- Host: Your website’s domain name or IP address
- Database Name: The name of your database
- Username: The database user’s username
- Password: The database user’s password
By following these steps, you can easily set up remote database access in cPanel, allowing you to manage your databases from different locations securely.