Home > Database > Mysql Tutorial > Solution to mysql startup error

Solution to mysql startup error

不言
Release: 2018-08-18 17:49:46
Original
2057 people have browsed it

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*
Copy after login

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
Copy after login
kill 28873
Copy after login
kill 30041
Copy after login
kill 30597
Copy after login

Then restart mysql

service mysql start
Copy after login

OK, solving the problem is that simple.

Related recommendations:

How to skip permissions in Mysql and perform operations

MySQL--Data Development Classics and Solutions

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template