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