MySQL hints MySQL daemon failed to start solution

Source: Internet
Author: User
Tags mysql database

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

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.