Solve the Problem of forcing Mysql to close unexpectedly and cannot start the solution
Start MySQL in CentOS: [wzhwho @ local ~] # Service mysqld startStarting mysqld daemon [FAILED]
View MySQL startup system logs
The default path for MySQL log files installed with rpm is/var/log/mysqld. log.
Principle
There is a mysql. sock file in the mysql installation directory. This file was created when mysql was started and deleted when mysql was disabled. If it is not properly shut down, mysql will not be able to delete the file. When this file still exists, mysql cannot be started and the above error is prompted. In a strange situation, google and Baidu did not have a solution to this problem. Then I can only use my own method to solve the problem, that is, before mysql is started, I will delete it if mysql. sock exists.
After deletion, the problem is solved.