MySql提示:The server quit without updating PID file失敗


解決方案有如下5種,我一般使用第一種就解決問題了,其他的在網上搜索的整理如下可做參考

1、kill已存在的mysql進程

ps -ef | grep mysqld
kill -9 xxx

2、mysql文件權限不足

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

3、第二次安裝mysql,之前有殘余數據影響服務啟動

刪除/mysql_data目錄下的mysql-bin.index文件

4、查看配置文件my.cnf

[root@tzPC mysql]# cat /etc/my.cnf
[mysqld]
user=mysql
basedir=/mnt/mysql
datadir=/mnt/mysql_data  #查看是否有此行
socket=/tmp/mysql.sock
server_id=6
port=3306
[mysql]
socket=/tmp/mysql.sock

5、關閉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 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM