MySQL Error: The server quit without updating PID file [How to Solve]

According to Google, there are many possible reasons for the problem. The best way to find out the specific reasons is to check the error log first:

1. The/usr/local/MySQL/data/ file may not have write permission
solution: give permission, execute “chown – R MySQL: MySQL/var/data” “Chmod – R 755/usr/local/MySQL/data”, and then restart mysqld!

2. There may already be a MySQL process in the process
solution: use the command “PS – ef|grep mysqld” to check whether there is a mysqld process. If so, use “kill – 9 process number” to kill, and then restart mysqld!

3. It may be the second time MySQL is installed on the machine. There is residual data that affects the startup of the service
solution: go to the MySQL data directory/data. If mysql-bin.index exists, delete it as soon as possible. It is the culprit. I use the third method to solve it!

4. The/etc/my.cnf configuration file will be used when MySQL does not specify a configuration file at startup. Please open this file to see if a data directory (dataDir) is specified under the [mysqld] section
solution: please set this line under [mysqld]: dataDir =/usr/local/MySQL/data

5. Skip federated field problem
solution: check the/etc/my.cnf file for uncommented skip federated fields. If so, comment them out immediately.

6. The error log directory does not exist
solution: use the “chown” and “Chmod” commands to give MySQL owners and permissions

7. SELinux causes trouble. If it is CentOS system, SELinux will be enabled by default
solution: close it, open/etc/SELinux/config, change SELinux = enabling to SELinux = disabled, save the disk, exit and try restarting the machine.

8. In /etc/my.cnf  Add the parameter user = root in [mysqld]

Similar Posts: