Mysql prompt in linux & quot; mysql deamon failed to start & quot

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.