Today, the MySQL database copy to another computer, the result is not even, reported "Can" T connect to the MySQL server on ' localhost ' (10061) "error.
To search online, found an article is very good, both methods can solve this problem
Online Search Method One:
1, delete My.ini (under c:/windows/), rerun Winmysqladmin, request to enter user name and password, solve problem!
2, look at the Hosts file localhost is not pointing 127.0.0.1
If the MySQL service is not started, you can run net start MySQL.
Some related commands:
The code is as follows |
Copy Code |
Mysqld-nt–install #启动Mysql
MySQL #运行Mysql
Mysql-h Ipaddress-u Username-p
|
Online Search Method Two:
MySQL 10061 Error resolution
If "Error 2003:can ' t connect to MySQL server ' localhost ' (10061)" appears,
Shows that your MySQL has not yet started. Solution:
Delete the My.ini under C:/windowns
Enter the bin directory under DOS
C:/Program Files/mysql/mysql Server 5.4/bin
The code is as follows |
Copy Code |
Enter Mysqld-nt-remove Delete Service in DOS
Then enter the Mysqld-nt-install installation service
|
The code is as follows |
Copy Code |
Enter net start MySQL
MySQL started successfully
|
Neither of these methods can solve my problem.
But, in fact, the above two methods have already said the point.
That is, my MySQL does not start. So how do we get it started.
Enter the bin directory under DOS
The code is as follows |
Copy Code |
C:/Program Files/mysql/mysql Server 5.4/bin
Then, enter net start MySQL directly
|