Setting up a Remote MySQL connection in cPanel

If you need to connect to your database using third party software that does not run on the server, such as a MySQL client on your desktop a remote MySQL connection can be made. First you will have to allow the connection from within cPanel for the IP address you are connecting from. 

What program do I use to connect Remotely?

There are a few programs you can use to connect remotely to your database. HTML editors like DreamWeaver can connect to your databases remotely as well. There are Free Open Source programs you can use like MySQL Workbench or or Heidi SQL. Below are some links to programs you can use to connect to your databases remotely.

  • Navicat for MySQL 10
  • MySQL Workbench 5.2
  • Heidi SQL

Adding an IP address to allow a remote MySQL connection

db_1First, you will need to make sure you have the IP address that will be accessing the database. These rules protect the database by only accepting external connections that you have set up. If you are connecting to a database from your current connection, you can obtain your current IP address by visiting this link: current IP address. Once you have the IP address that you wish to connect remotely, log into cPanel and click on "Remote MySQL" under the Databases Heading.

db_2Next, you'll need to add the IP address into the field on the page and select "Add Host".

Now, since you have added the IP address to remote MySQL connections you will be able to connect to the databases. You can add as many IP addresses as you need.


Using a Wildcard to allow all IP's

You may find you need to use a wildcard if your IP address changes regularly. You can add a wildcard by using the % symbol. This will add all IP addresses in that range.

If you want to list all IP addresses in the range 174.77.92.1 to 174.77.92.255 you'd add the IP address 174.77.92.%.

Troubleshooting Remote connection issues

If you are using your preferred remote connection tool and suddenly it will not connect. This error is known as a 1045 and usually reads similar to '1045 - access denied for user'. If you are getting this error, there are a couple of things listed below that you may want to check.

Check your cPanel password

Many people connect remotely using their cPanel username and password as opposed to creating a single administrative user to add to the databases. This is not the preferred method, however if you do use the cPanel username and you are now getting a connection error, chances are you recently changed the cPanel password and have not changed it in the Remote connection software settings. Change the password there and you should be able to connect once again.

Check to see if connecting IP has changed

Not all of us are blessed with static IP addresses. From time to time your ISP (Internet Service Provider) may change your public IP address. If that is the case, you may find yourself unable to connect remotely via your preferred software. First, check your IP address by going to Google.com and searching for the term IP. You can also find your current IP address by clicking here.

Once you know your current IP address, go back and make sure that it is in the list of allowed IP addresses for your Remote MySQL settings. If you find it was not in the list and add the new one, you should then be able to connect remotely.




  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Login to cPanel

Before you can log into cPanel, you must open your Internet browser. This will work in whatever...

Becoming Familiar And Navigating Around in CPanel

Lets learn about cPanel, and how to navigate it's many pages and functions. Making sure that...

How to Change Your cPanel Password

This tutorial will teach you how to change your cPanel password. Please remember to make your...

How To Change Your cPanel Style

This tutorial will teach how to change your cPanel style. cPanel comes in a variety of styles...

How to View Website Statistics in cPanel using AWStats

This tutorial will teach you how to check on who is viewing your website using the program in...