selinux干扰mysql启动
[root@echoyang5 mysql_xinchao]# /etc/init.d/mysqld start
/usr/bin/mysqld_safe: line 549: /data/mysql_xinchao/mysqld_safe.pid: Permission denied
awk: (FILENAME=- FNR=1) warning: error writing standard output (Broken pipe)
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
我用/usr/bin/mysqld_safe都能启动,但就是没法用/etc/init.d/mysqld start 启动mysql
折腾了两天,是因为selinux没有关闭导致的。
解决:
vim /etc/selinux/config
把SELINUX=enforcing改为SELINUX=disabled
重启机器之后
再用 /etc/init.d/mysqld start启动,就成功了。