Sometimes the database host suddenly loses power or shuts down unexpectedly, the following error occurs when starting the MySQL database:
Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/var/localhost. pid ).
Solution:
View the content of localhost. err in the var folder of the MySQL database directory and determine the reason for the failure.
Check the/tmp/directory permission and set the/tmp permission to 777.
Check the var folder in the MySQL installation directory and check the bin. xxx file in the mysql-bin.index file
Modify the configuration of the/etc/my. cnf file
If the database cannot be started, you can view mysql/var/localhost. find the specific cause of failure in the err file. During MySQL startup, all MySQL startup information is recorded in this file, the best way to see problems is to view logs.
Possible operations:
Rm-rf/usr/local/mysql/var/mysql-bin .*
Chmod 777/tmp/
Start the database.