linux mysql error: MYSQL:The server quit without updating PID file

  • 2020-05-15 02:17:38
  • OfStack

1. May be/usr local mysql/data/rekfan pid files do not have permission to write
Solution: to give permission, the implementation of the "chown - R mysql: mysql var/data" "chmod - 755 / usr local R/mysql data" and then restart the mysqld!

2. The mysql process may already exist in the process
Solution: use the command "ps-ef |grep mysqld" to see if there is an mysqld process. If there is an kill-9 process killed, then restart mysqld!

3. It may be the second time to install mysql on the machine, and the residual data has affected the service startup.
Solution: go to mysql's data directory /data. If mysql-bin.index exists, just delete it. It's the culprit.

4.mysql will use the /etc/ my.cnf configuration file if it is not specified at startup. Open this file to see if you have specified a data directory (datadir) under [mysqld].
Solution: please set up under the [mysqld] this line 1: datadir = / usr local/mysql/data

5. Problems with the skip-federated field
Solution: check 1 /etc/ my.cnf file for the skip-federated field that has not been commented out, and if so, comment out immediately.

6. The error log directory does not exist
Solution: use the "chown" "chmod" command to give mysql owners and permissions

7.selinux, if it is the centos system, selinux will be turned on by default
Solution: turn it off, open /etc/selinux/config, change SELINUX=enforcing to SELINUX=disabled, and then try to restart the machine.


Related articles: