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
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
View the mysqld log file
#less /var/log/mysqld.log
One of the lines is:
/usr/libexec/mysqld: Can't change dir to ‘XXX' (Errcode: 13)
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
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
indicates that SELinux has been enabled. It only needs to be turned off.
Close method:
#setenforce 0 (0|1 开|关)
setsebool ftpd_disable_trans 1
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!