程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> linux下mysql提示"mysql deamon failed to start&quot

linux下mysql提示"mysql deamon failed to start&quot

編輯:MySQL綜合教程

有台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

命令也可以.

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved