Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-01 13:24:06
Original
945 people have browsed it

bitsCN.com 有台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

命令也可以.bitsCN.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!