CentOS7 安装Mysql5.6 后启动失败处理 The server quit without updating PID file

第一次:

service mysqld start

报错;

Warning: World-writable config file '/etc/my.cnf' is ignored
Starting MySQL.Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored
Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
...The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]

处理过程:查看错误文件 有提示Can't start server : Bind on unix socket: Permission denied

执行命令:chmod 644 /etc/my.cnf

第二次  service mysqld start

报错 :Starting MySQL.190604 22:17:37 mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.
The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]

处理过程:查看文件夹是否存在,确实没存在,创建目录;

第三次 service mysqld start

报错:Starting MySQL....The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]

这个是最头疼的 百度了一天 中间还重新卸载从新安装过一次。。还发现了网上部分博客来回抄袭的严重!

尝试过程。。

[root@localhost mysql]# service mysqld start
Starting MySQL....The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
[root@localhost mysql]# service mysqld status
MySQL is not running, but lock file (/var/lock/subsys/mysql) exists[失败]
[root@localhost mysql]# chmod -R 755 /usr/local/mysql/data

[root@localhost mysql]# service mysqld status
MySQL is not running, but lock file (/var/lock/subsys/mysql) exists[失败]
[root@localhost mysql]# service mysqld start
Starting MySQL....The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
[root@localhost mysql]# ps -ef|grep mysqld
root      79417  77519  0 22:26 pts/0    00:00:00 grep --color=auto mysqld

[root@localhost mysql]# vi /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

"/etc/selinux/config" 14L, 546C written
[root@localhost mysql]# reboot

最后处理过程==========应该是重点吧=============

[root@localhost mysql]#  service mysqld start
Starting MySQL.Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
...The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
[root@localhost mysql]# chmod  777 /var/lib/mysql/
[root@localhost mysql]# chmod  777 /var/lib/mysql/
[root@localhost mysql]# 
[root@localhost mysql]#  service mysqld start
Starting MySQL..[  确定  ]

[root@localhost mysql]# 

折腾了一天终于搞定~!

 

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值