Monday, September 21, 2009

ERROR 2003: Can't connect to MySQL server (10060)

ERROR 2003: Can't connect to MySQL server (10060)

Well, finally I rectified this error after doing google and research for 3.5 Hours.

I installed mysql database on my machine and I was trying to access it from the remote machine using MySQL query browser. But it was giving the error. If you are also facing the same problem then here are couple of things you can try.

  • If you have antivirus/firewall installed then make sure that it is not blocking traffic for port 3306(default port for mysql).

  • I have installed/configured MySQL to run as a service in windows box. If you have the same configuration, then open the Computer Management by Manage.

    Go to Service under Services And Applicaton.

    Look for mysql service and double click it to check the properties.

    The executable path should be like this: "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini" MySQL

    Now it uses "my.ini" file for the configuration. Open this file on text editor. Under [mysqld] section add following line:

    bind-address=0.0.0.0

    You can give any ip address, if you want to listen only to localhost then you can give 127.0.0.1. The above configuration will listen to all ip addresses.

    If you are on linux machine, then you have to edit /etc/mysql/my.cnf file.


Hope this helps !!!
Enjoy !! :)

7 comments:

Anonymous said...

unfortunately this did not work for me. In fact, I have two MySQL servers running on a system. One on 3306 and other 3307. The one on 3306 works fine from remote machines. The one on 3307 spits the error 2003. Let me know if you have any thoughts.

Prasad Tharanga said...

thanks so mush

Unknown said...

do u work for TCS/RNOW?

Mayank said...

No. I don't work for TCS/RNOW.

Anli Chandra's Blog said...

Don't work for me too. I reinstall a computer and try connect again but can't, it previously can connect.

Unknown said...

Check host.err file in db folder...

Unknown said...

Confronting "Can't Connect to MySQL server? Contact to MySQL Server 5.0 Support
Ordinarily clients are not ready to associate with MySQL server in light of some after reasons: if there is arrange disappointment, no MySQL is running on the specified host, firewall blocking or because of some different reasons. Ensure; on the off chance that you know how to tackle this issue at that point proceed and rapidly fathom it generally pick most ideal approach to dispose of this issue i.e. MySQL Remote Support or MySQL Remote Service. We at Cognegic have various years of involvement in MySQL and viably comprehend your questions and give you most ideal arrangement.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email Address- info@cognegicsystems.com
Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801