linux under mysql prompts 'mysql deamon failed to start' wrong solution

  • 2020-05-17 06:41:37
  • OfStack

There is an linux server and the system is centos system.

The website suddenly could not connect to the database, so the friend directly restarted 1 server. Go into cli mode and execute service myqsld start and you still get the "mysql deamon failed to start" error message.

# /etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]

View the log file for mysqld

#less /var/log/mysqld.log
/usr/libexec/mysqld: Can't change dir to '(Errcode: 13)

The first is to look at the 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. There is no problem with the permissions and users, which should be the limits of the permissions of SELINUX.

View the current configuration information first.

# getenforce

Enforcing

This means that SELinux is enabled. Just turn it off.

Closing method:

#setenforce 0 (0|1 on | off)

or

setsebool ftpd_disable_trans 1

So can commands.

Related articles: