Home > Database > Mysql Tutorial > body text

MySQL - Solution to the error 'mysql deamon failed to start'

黄舟
Release: 2017-01-21 13:17:41
Original
1299 people have browsed it

The website suddenly couldn't connect to the database, so I restarted the server directly. Enter the cli mode, execute service myqsld start and find that the error message "MySQL deamon failed to start" is still prompted

# /etc/init.d/mysqld start
Copy after login

MySQL Daemon failed to start.
Starting mysqld: [FAILED]

View the mysqld log file

#less /var/log/mysqld.log
Copy after login

One of the lines is:

/usr/libexec/mysqld: Can't change dir to ‘XXX' (Errcode: 13)
Copy after login

First check the database log

[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
Copy after login

First check the permissions and user names of the data directory and log directory , there is no problem with the permissions and the user it belongs to. It should be that the permissions of SELINUX are restricted.

# getenforce
Copy after login

Enforcing
means that SELinux has been enabled. It only needs to be turned off.
Close method:

#setenforce 0 (0|1 开|关)
Copy after login

or

setsebool ftpd_disable_trans 1
Copy after login

The above is the solution to the MySQL prompt "mysql deamon failed to start" error. For more related content, please pay attention to PHP Chinese Net (www.php.cn)!


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!