Solution to MySQL failure in CentOS6

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.