MySql Warning: The server quit without updating PID file error

There are 5 solutions as follows, I generally use the first one to solve the problem, and the other online searches are organized as follows for reference

1. Kill the existing mysql process

ps -ef | grep mysqld
kill -9 xxx

2. Insufficient mysql file permissions

chown -R mysql:mysql /mnt/mysql
chmod -R 755 /mnt/mysql
/etc/init.d/mysqld restart

3. When mysql is installed for the second time, there is residual data that affects the service startup

Delete the mysql-bin.index file in the /mysql_data directory

4. View the configuration file my.cnf

[root@tzPC mysql]# cat /etc/ my.cnf 
[mysqld] 
user = mysql 
basedir =/mnt/ mysql 
datadir =/mnt/ mysql_data #Check if there is this line 
socket =/tmp/ mysql.sock 
server_id = 6 
port = 3306 
[mysql] 
socket =/tmp/mysql.sock

5. Turn off selinux

[root@tzPC mysql]# cat /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *