There are several scenarios for the webmaster where accessing the cPanel database remotely becomes necessary, as they need to perform database-related tasks from external locations. Some common cases include development and testing, data migration, backup & restoration, third-party integrations, remote administration, or collaborative work.
Accessing the database remotely through cPanel might require a bit of technical know-how. This detailed guide will explore the steps to access the cPanel database remotely, allowing you to perform database-related operations from external locations.
Before we jump on to the steps, find out something useful.
Also Read: How To Change Your Website’s Content In cPanel?
Things to Know Before Enabling Remote Database Access
When establishing a remote connection from your home computer, it is essential to employ database management tools such as MySQL, MariaDB, Oracle, PostgreSQL, MSSQL, SQLite, MongoDB, Navicat, phpMyAdmin, Workbench, or any other tool on your PC.
To authorize your computer as an access host, it’s crucial to recognize that all IP addresses are initially blocked and need to be added to a list for server access.
Therefore, before connecting to MySQL from a different computer, the connecting computer must be granted access as an Access Host.
If your IP address changes regularly because of a dynamic IP from your Internet Service Provider (ISP), remember to update the IP in Remote MySQL whenever it changes.
Also Read: How to Change PHP Version in cPanel?
Steps to Access the cPanel Database Remotely
Firstly, you have to manage your IP address as an Access host. Find out how.
➢ How To Manage IP Address as an Access Host
➔ Log in to cPanel.
➔ Next, in the cPanel, go to the ‘Databases’ section and click the ‘Remote MySQL®’ icon.
➔ On the Remote MySQL® page, you have to add the connecting IP address in the ‘Host’ section.
➔ In that section, you have to add the IP address of your PC. To know the IP address, search in the browser ‘What is my IP’ & you will get the IP address in the search results. Just copy & paste the code in the ‘Host’ section
➔ Once you have added, click the ‘Add Host’ button
Your IP address has been added to the cPanel. You can see the added IP address under the ‘Manage Access Hosts’ section.
Also Read: How to Clear the Website Cache in cPanel?
➢ How to Access Database on Your PC After Add Access Host?
There are various free and commercial applications available for remote database access in the market. For example, MySQL Workbench, HeidiSQL, and so forth.
In this article, we will continue our RemoteSQL connection to the MySQL Workbench. You may use HeidiSQL to connect remotely to a database created on another hosting server or your base server.
➔ Download the MySQL Workbench application on your desired operating system from their official website. We have installed it on the Windows operating system.
➔ Now click the ‘+ Plus’ icon on the left for Remote MySQL database access.
➔ A box will open with the form. Here, fill in the required information:
- Enter the ‘Connection Name’ whatever you want.
- Enter the ‘Hostname’ which is provided by your hosting provider.
- Enter the ‘Username’ of your cPanel in this box.
All other information will be kept as already stated in the box.
➔ Now, you have to click the ‘Store in Vault’ button next to the ‘Password’.
➔ A new box will appear. There, you have to enter the panel’s password you use for cPanel login.
➔ Once you added it, click on the ‘OK’ button.
➔ After adding the required information, click the ‘Test Connection’ button below.
You will see the message ‘Successfully made the MySQL Connection.’ Just click ‘OK’ to continue.
➔ You will see your username in the MySQL connections list. Click on it to proceed. It will opened the SQL Editor.
➔ Click on it to proceed. It will opened the SQL Editor.
That’s it; your MySQL remote connection has been successfully set up.
Also Read: How to Create a PHPinfo File and View PHP Information?
To Sum Up,
Accessing the cPanel database remotely offers website administrators and developers flexibility and convenience in managing website data. Following the steps in this guide, users can safely access their cPanel databases from external locations.