Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I tried to connect the remote MySQL server by using command line mysql -h <remote-ip> -u any_existing_users -p or any other mysql client such as phpmyadmin, it didn't work and the error hint was

ERROR 2003 (HY000) Can't connect to MySQL server on '<remote-ip>' (61)

But, when I tried ssh <remote-ip> and connected the MySQL locally by mysql -u root -p, there is no problem.

Here is part of the user table(SELECT User, Host FROM mysql.user;):

| User             | Host           |
| root             | %              |
| other_users      | <remote-ip>    |
| root             | localhost      |

So, what's the problem?

share|improve this question

Have you enable networking in your mysql server, please verify once more if not below are the steps by which you can do it

  Edit /etc/my.cnf, run:
  # vi /etc/my.cnf

  Once file opened, locate line that read as follows

  Make sure line skip-networking is commented (or remove line) and add following line

share|improve this answer
also check your IPtables should not be blocking mysql connection remotely. – Abhishek Anand Amralkar Apr 23 '13 at 5:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.