cPanel provides you the ability to connect to the databases on your account from another location. We are happy to offer Hostwinds clients the ability to use this feature in our Shared hosting and Business web hosting services. Additionally, you can use any software that can connect to a MySQL database and then modify and update the database through the software making managing your database even easier for you to do. This article will go over how to enable Remote MySQL access for your account.
Enable Remote MySQL
Login to your cPanel Account. You can do this using the link sent to you via email when the plan was initially purchased.
Adding MySQL Remote Access Hosts
To utilize Remote MySQL, you will need to add the connecting IP to the whitelist for your account. You can do this through the cPanel under the Remote MySQL icon in the Databases section.
Once on this page, you'll want to enter the host's name (fully qualified domain name) or the system's IP making the connection, and click Add Host. Once you have added the host IP, click on 'Add Host.'
You may use the percentage sign character (%) as a wildcard. For example, to allow access from all IP addresses that begin with 104.12.43., enter 104.17.43.%.
Once a Host has been added, you can also Delete the Access Host by clicking on the Delete button.
Host or Server
Either 1) Your domain name or 2) Your Dedicated IP
The database user that you have added to the database
The database user's password
The name of the database
Testing a Connection
If you would like to test the connection to your Database, you can use the following code snip-it to create a PHP file that you can run. It will tell you if the connection was successful or if there was an error. Once it is connected, it will close the connection.
die("Connection failed: " . $conn->connect_error);
echo "Connected successfully
// Close the connection once finished.
echo "Connection now closed successfully";