Articles on: cPanel

How to Connect to MySQL Remotely in cPanel?

If you're a developer or managing a web application from your local computer, you might need to connect to your website's MySQL database remotely. cPanel provides a feature called Remote MySQL that allows you to do this. To enable the connection, you’ll first need to add your computer’s IP address to the allowed list in cPanel. Once added, you can connect using your preferred MySQL client or application.

Step-by-step: Allow remote connections

Log in to cPanel using Username & Password.

Scroll down navigate to Database > Remote Database Access.


Provide the following necessary details.
Host: Enter your static network IP (IP that not change). If you don’t have a specific IP address to allow, you can enable access from all IP addresses by using a wildcard symbol “%” in the Host field. In this guide, we’ll demonstrate how to allow remote connections from any IP address using this method.

Important: Using a wildcard symbol (such as “%”) can be risky because it grants broad access. To minimize security risks, it's recommended to revert the wildcard setting and apply more specific, restricted permissions instead.
Comment: Enter your domain name.
To save the configuration. Click the " Add Host".


Step by Step: Connect to MySQL remotely.

Download and install the HeidiSQL application. Follow this link to download: HeidiSQL Installer

Click on " +NEW" for Remote MySQL Connection.

Next, choose the Network Type, select the appropriate Library, and fill in the required details as follows:
Hostname/IP: Enter the IP address or hostname of your MySQL server. You can retrieve the IP address at cPanel > General Information > Shared IP Address

User: Enter your database username. You can check your username at cPanel > Manage My Database > Current Users


Password: Enter the password associated with your MySQL username.

Port: Enter the MySQL port number (default is usually 3306).

Database Name: Enter the name of the MySQL database you want to connect to.

Now, click on "Open" to start connecting to the MySQL server remotely.

Conclusion
Now that we've covered how to allow remote MySQL connections and connect using the HeidiSQL application on Windows, you should be able to access your MySQL database remotely from any location. Just make sure that your IP address is added in cPanel → Remote MySQL to allow the connection.

If you face any issues or need assistance, don’t hesitate to reach out — our support team is always ready to help!

🔧 Need help? Submit a Support Ticket
💬 Chat with us on Live Chat via our website

Updated on: 20/05/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!