Search The Hostwinds Guides Knowledge Base

Remote MySQL in cPanel

Share This Article [TheChamp-Sharing]

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 and Business web hosting services. 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

First, login to the Client Area and click the Manage button next to your shared or business hosting package.

manage business hosting

Then click on the Login to cPanel on the left side of the page.

login to cpanel

Adding MySQL Remote Access Hosts

To be able to utilize Remote MySQL, you will need to add the connecting IP to the whitelist for your account. This can be done through the cPanel under the Remote MySQL icon in the Databases section.

Remote MySQL Icon Location in cPanel

Once on this page, you’ll want to enter the host’s name (fully qualified domain name) or the IP of the system making the connection and click Add Host. Once you have added the host IP, just click on ‘Add Host.’

Displaying where to put the IP in for Remote MySQL access

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.

Common Settings

Host or ServerEither 1) Your domain name or 2) Your Dedicated IP
UsernameThe database user that you have added to the database
PasswordThe database user’s password
DatabaseThe 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. $conn->close(); echo "Connection now closed successfully"; ?>

Related Articles

Related Resources

  • Navicat – Access your database by downloading Navicat
  • MySQL WorkBench – Access your database by downloading MySQL WorkBench
  • Heidi SQL – Access your database by downloading Heidi SQL
  • Find your Computer’s IP Address – Visit > type in IP > hit Enter
  • Code Source – Source code for example