Home > Database > Mysql Tutorial > MySQL - Solution to the error 'mysql deamon failed to start'

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

黄舟
Release: 2017-03-13 13:30:34
Original
1263 people have browsed it

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

# /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

The first thing is to 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 of the data directory and the log directory and the users they belong to. If there is no problem with the permissions and users, it should be SE# The permission restriction of ##LINUX

# getenforce
Copy after login

Enforcing

indicates 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 detailed content of MySQL - Solution to the error 'mysql deamon failed to start'. For more information, please follow other related articles on the PHP Chinese website!

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