Sometime we will meet the problem of can not connect to MySQL server on 'localhost' (10061),how to solve this problem?
The possible reasons for this problem.
1, MySQL service does not start, generally due to in exceptional circumstances MySQL can not start , for example, no available disk space, my.ini basedir path settings error in the MySQL, etc.
2, MySQL server resource constraints, leading to not connect.
First check if the MySQL service started.If it did not start, you need to start the service.
1.Delete the my.ini on c:\windows\
2.Open c:\mysql\bin\winmysqladmin.exe ,enter the user name and password.
3.In cmd mode type the mysqld-nt -remove,and then type mysqld-nt -install.
4.Type mysql and start mysql service.
The other way to solve this problem is uninstall the windows patch KB967723.If your sever update this patch ,it maybe cause this problem.You can uninstall this patch to solve this problem.
If your the database connection exceeds the maximum number of connections,cause the mysql service stop to work,you can find the my.ini and open it.Modify the max_connections as a larger number and start the mysql service.
This address is http://www.computerites.com/database-knowledge/2013/05/the-solutions-of-can-not-connect-to-mysql-server-on-localhost-10061-738.html