The content of this article is about the solution to the MySQL startup error. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
After solving the cross-privilege operation of the database yesterday, an error suddenly occurred when I opened the project today. Then when I restarted the database, an error occurred ERROR! MySQL server PID file could not be found!, command When trying to connect to the database, it also reported Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2). I found some information online and found that they were all copied from each other. , and did not solve the problem. Then I fumbled around and the problem was solved. Here is my solution so that children's shoes who have the same problem as me can refer to it and solve it.
First check the process
##
ps aux |grep mysq*
If you see the red circled part above, it means that the Mysql process is stuck. At this time, you need to close all these stuck processes.
##kill 27664
kill 28873
kill 30041
kill 30597
service mysql start
OK, solving the problem is that simple.
Related recommendations:
The above is the detailed content of Solution to mysql startup error. For more information, please follow other related articles on the PHP Chinese website!