網站突然連接不上資料庫,於是直接重啟了一下伺服器。進到cli模式下,執行service myqsld start 發現還是提示"MySQL deamon failed to start"錯誤訊息
# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
是:
#less /var/log/mysqld.log
首先是查看資料庫日誌
/usr/libexec/mysqld: Can't change dir to ‘XXX' (Errcode: 13)
[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
Enforcing
就表明SELinux已經啟用.只需要關閉即可。關閉方法:
# getenforce
#setenforce 0 (0|1 开|关)
以上就是 MySQL之-提示"mysql deamon failed to start"錯誤的解決方法的內容,更多相關內容請關注PHP中文網(m.sbmmt.com)!