linux下启动mysql提示”mysql deamon failed to start”错误的解决办法

有台linux服务器,系统为centos系统.

描述:

网站突然连接不上数据库,于是朋友直接重启了一下服务器。进到cli模式下,执行 service myqsld start 发现还是提示”mysql deamon failed to start”错误信息.

# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
查看mysqld的log文件
#less /var/log/mysqld.log
/usr/libexec/mysqld: Can’t change dir to ‘XXX’ (Errcode: 13)

首先是查看数据库日志

mysqld started

[Warning] Can’t create test file xxx.lower-test
[Warning] Can’t create test file xxx.lower-test
/usr/libexec/mysqld: Can’t change dir to ‘/xxx’ (Errcode: 13)

[ERROR] Aborting

首先检查数据目录和日志目录的权限和所属用户,权限和所属用户都没问题,那应该是SELINUX的权限限制了。

先查看当前配置信息.

# getenforce

Enforcing

就表明SELinux已经启用.只需要关闭即可。

关闭方法:

#setenforce 0       (0|1  开|关)

或者

setsebool ftpd_disable_trans 1

命令也可以.

18 thoughts on “linux下启动mysql提示”mysql deamon failed to start”错误的解决办法

  1. Pingback: 918kissbyp8.com

  2. Pingback: Kline Potente

  3. Pingback: forum

  4. Pingback: Download South African Music SA

  5. Pingback: Dream Market

  6. Pingback: ซี ฉัตรปวีณ์ ตรีชัชวาลวงศ์

  7. Pingback: the best roofer

  8. Pingback: www.cbdadverts.com

  9. Pingback: ลงประกาศฟรี

  10. Pingback: medicare Plan

  11. Pingback: dominoqq

  12. Pingback: 카지노

  13. Pingback: north carolina cornhole

  14. Pingback: https://przedszkolelidzbark.pl/

  15. Pingback: 카지노

  16. Pingback: https://maxvax.pl/

  17. Pingback: carpet cleaning companies in barnet

  18. Pingback: Types Of Fishing Poles

Comments are closed.