Solution for mysql error 10061, mysql10061
This article will share with you the solutions for mysql's appearance of Can't connect to MySQL server on 'localhost' (10061) for your reference. The specific content is as follows:
Method 1:
I copied the mysql database to another machine today and the result could not be connected. The error "Can't connect to MySQL server on 'localhost' (10061)" is reported.
Search online and find that an article is good. Both methods can solve this problem.
1. delete my. ini (under C: \ windows \) and run winmysqladmin again. After Entering the user name and password, the problem is solved!
2. Check whether the localhost In the hosts file points to 127.0.0.1.
If the mysql service is not started, you can run net start mysql.
Some related commands:
Mysqld-nt -- install # Start Mysql
Mysql # Run Mysql
Mysql-h ipAddress-u username-p
Method 2:
Solution to mysql 10061 Error
If "ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)" appears )",
It indicates that your MySQL instance has not been started yet. Solution:
Step 1
Delete my. ini under c: \ windowns
Step 2
Enter the BIN directory under DOS
C: \ Program Files \ MySQL Server 5.4 \ bin
Step 3
Input mysqld-nt-remove in DOS to delete the service
Enter mysqld-nt-install to install the service.
Step 4
Enter net start mysql
Mysql started successfully
Bytes --------------------------------------------------------------------------------------------------------
The above two methods cannot solve my problem.
However, the above two methods have already been highlighted. That is, my MySQL has not been started yet. So how can we start it.
Enter the BIN directory under DOS
C: \ Program Files \ MySQL Server 5.4 \ bin
Then, directly enter net start mysql
Then enter.
As follows:
Or directly
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.