In this tutorial:

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.

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.

If you need further assistance with connecting to a database remotely please contact our support department

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Comments

Post a comment
2012-11-12 6:40 pm
You should mention how we find out HOW to access our MySQL databases from the remote location? What address do we use from the remote location to access the MySQL database?
Staff
10,626 Points
2012-11-12 7:18 pm
Hello Airquality,

Apologies, but this is a general article about making a remote connection to a database. Access to the database is generally based on the URL used to get to the server, and the user name and password assigned to the database you're trying to access. You will need to provide your IP address in order to allow the access through the firewall. This access is ONLY for database access (which occurs by default through a specific port). All of this is determined the Remote MySQL setup.

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.

Regards,

Arnel C.
2013-09-18 12:14 am
As you said use % as Wildcard then , how to allow all remote connection ?
Staff
4,269 Points
2013-09-18 8:37 am
If you want to allow all IP addresses to connect to a remote MySQL server, you would use wildwards such as %.%.%.% which would allow any IP address to connect. Doing so, however, is a very large security risk and I highly recommend against it.
n/a Points
2014-04-18 6:32 am

I'm trying to synchronize data tables  local install (mamp)  phpmysqladmin and it failes. I'm unable to troblehoot with telnet connection.

Upon telneting to my site, it ask only for password and not a username.  I already assigned username and password for specific database.  Which password is it waiting for? cpanel, my domain login to inmotion, or something else? 

After several failed attempts, i'm not allowed connet back to my ip address and get a packet out of order.

 

The error message attempting to connect:

5.5.36-cll?r"L=*W\?*?<P]cZwg"n(mysql_native_password (mypasswordhere)!#08S01Got packets out of orderConnection closed by foreign host.

?Host '107-223-112-160.lightspeed.sndgca.sbcglobal.net' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host.

Do i have the 'mysqladmin flush-hosts ability? It doesn't work in sql screen and looks like a command prompt from the unix shell.  I don't have access directly to that unix shell that i'm aware of.

 

Example Edited log below.

Joeys-MacAir:cgi-bin boun619$ telnet 70.39.999.999 3306Trying 70.39.999.999...Connected to ecbiz999999.inmotionhosting.com.Escape character is '^]'.N5.5.36-cllf?=Z/z:Rm?(u6KVOh=9E-Rmysql_native_password

Connection closed by foreign host.

 

Any Ideas?

-Joey

Staff
4,269 Points
2014-04-18 7:46 am
First, you will not be able to telnet into your account. You will have to use a remote MySQL connection instead. When logging in remotely, you will be using the username and password to the MySQL user that is accessing the database that you want to connect to. This is something that you would have created within cPanel. As for the flush-hosts issue, this is caused by too many bad connections to the server and would need to be resolved by contacting technical support.

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!