MySQL startup error Starting MySQL. Manager of pid-file quit without updating file. [FAILED]

Source: Internet
Author: User

After MySQL is installed in the morning, the following error is reported during startup:

Starting MySQL. Manager of pid-file quit without updating file. [FAILED]


I tried various methods found by Gu Jie in sequence, and found that you only need to execute the following MySQL initialization command to solve the problem:

/Usr/local/mysql/bin/mysql_install_db -- user = mysql


The following is a collection of methods found by Gu Jie to solve this problem. The reasons may be different for your reference:

1. View error logs

The error log is the direction light for us to solve the problem. If there is no direction light, we will have no direction.
The following error is displayed in the error log when I install it:


/Usr/local/mysql/bin/mysqld: error while loading shared libraries: libstdc ++. so.5: cannot open your dobject file: No such file or directory

Obviously, the library file libstdc ++. so.5 is missing. In this case, we can search for the libstdc-related package for installation.
II. The fault may be caused by selinux
If the centos system is used, selinux is enabled by default. In this case, disable selinux first, enable/etc/SELINUX/config, change SELINUX = enforcing to selinux = disabled, and then exit and restart the machine.
III. Residual data
It may also be the second time to install mysql on the machine, there is residual data that affects the startup of the service, go to the mysql data directory/data to see if there is a mysql-bin.index, delete it as soon as possible. It is the culprit.
IV. Determine data directory permissions
The data directory is generally <prefix>/data. Check its ownership. If it is not the mysql owner, mysql users and groups will be created during installation, modify the user and group:

Chown-R mysql: mysql/var/data

5. No data directory specified

Mysql uses the/etc/my. cnf configuration file when the configuration file is not specified at startup. Open this file to see if there is a specified data directory (datadir) in [mysqld ). If not, set this line in [mysqld:

Datadir =/usr/local/mysql/data

6. The mysql process is running.

If this is the second time mysql is installed on the machine, it is very likely that this situation will occur. At this time, there may be mysql processes running on the system. You can run the following command to view the details:

Ps-ef | grep mysql

If there are more than one row of results, kill it.
VII. What is the skip-federated field?
Check whether the skip-federated field has been commented out in the/etc/my. cnf file. If so, comment out the field immediately.
8. Error log directory does not exist
Maybe you still don't know where the mysql error log is? In this case, you can run the following command:

Cd mysql/bin
./Mysql_safe

At this time, an error will be reported, and the error will be displayed in the XX file of the XX Directory. Here, check whether the directory and file are in, and then follow the log instructions to solve the problem, if not, create a directory and modify its permissions and permissions. Usually/var/lib/mysql. error. Note that mysql. error does not need to be created.


Cd/var/lib
Mkdir mysql
Chmod 777 mysql
Chown mysql: mysql

Try again. If the problem persists, leave a message to help you ......

From Angel Sanctuary

9. data/mysql-bin.index may be at work
Cause: mysql cannot be started because the hard disk is full. Log on to the system and check the cause. Delete the mysql log file and restart mysql. The following error is found: Starting MySQL. Manager of pid-file quit without updating file. [FAILED]
There are many explanations for this reason on the Internet, but none of them are what I want to say. The reason I'm going to say is actually very idiotic: data/mysql-bin.index is not deleted, data/mysql-bin.index is the file that stores the index of log files, it is obviously impossible to delete the log file and not process the index file of the log.
Delete the data/mysql-bin.index file, and then service mysqld start.

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.