Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to connect a remote mysql server but when I try to connect then I get following error:

ERROR 2003 (HY000): Can't connect to MySQL server on 'My Server IP' (110)

Possibilities (Found over the web) :
1. May be local computer's outgoing connection not allowed from where I am connecting.
I have tried to connect another remote mysql remote server which is accessible. So its mean there is not any error related to outbound rule.
2. May be remote server's port is not public. - I have tried to connect same server which is not accessible from Computer A, with Computer B and its working fine with Computer B.

Advice?

Have u any idea what can be wrong except above possibilities?

thanks in advace

share|improve this question
    
Double-check the IP of the server. Try ping to ensure it's available from your PC. Usually mysql runs on port 3306, try connecting to this port directly using 'telnet' or PuTTY in Windows. Check you have mysql running on server side (you should see it in process list), ensure firewall doesn't block port 3306. –  Dmitry Alexeyev Apr 24 '11 at 6:55

1 Answer 1

The Error Code 2003 is a error that is returned by Mysql client. On your server do the following.

netstats -ntlp |grep 3306

You should get a result similar to

Proto Recv-Q Send-Q   Local Address         Foreign Address         State       PID/Program name
tcp        0      0   0.0.0.0:3306          0.0.0.0:*               LISTEN      -               

If the Local Address is 127.0.0.1 then your mysql is listening on loopback and you not be able to connect from any other host, modify the settings in my.cnf and restart mysql. If Local Address is 0.0.0.0 check your firewall settings.

Heads up. After solving the remote connectivity the next problem that you will run in to will be access denied error, because you wouldn't have the appropriate grants.

share|improve this answer

Your Answer

 
discard

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.