There is a linux server. The system is centos.
The website suddenly failed to connect to the database, so a friend directly restarted the server. In cli mode, run service myqsld start to find the error message "mysql deamon failed to start.
#/Etc/init. d/mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
View the log file of mysqld
# Less/var/log/mysqld. log
/Usr/libexec/mysqld: Can't change dir to 'xxx' (Errcode: 13)
First, view database logs.
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
First, check the permissions and users of the data directory and log directory. The permissions and users are correct. It should be the SELINUX permission restriction.
First, view the current configuration information.
# Getenforce
Enforcing
SELinux is enabled. You only need to disable SELinux.
Close method:
# Setenforce 0 (0 | 1 on | off)
Or
Setsebool ftpd_disable_trans 1
Command.