In CLI mode, perform service MYQSLD start discovery or Prompt "MySQL Deamon failed to start" error message.
#/etc/init.d/mysqld Start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
View Log files for mysqld
#less/var/log/mysqld.log
/usr/libexec/mysqld:can ' t change dir to ' XXX ' (errcode:13)
First, view the database log
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 data directory and log directory permissions and the owner of the user, permissions and the user is not a problem, it should be selinux permission restrictions.
View the current configuration information first.
# Getenforce
Enforcing
Indicates that the SELinux has been enabled. Only need to close it.
Close method:
#setenforce 0 (0|1 open | off)
Or
Setsebool Ftpd_disable_trans 1
Commands are also available.
Of course, the above method is not the best solution we can directly to the permissions on it.
According to the log situation, the specific analysis of processing, is generally
MySQL Database permissions issues: chmod 777-r/var/lib/mysql;
Note Database users: Chown-r mysql:mysql/var/lib/mysql