MySQL cannot reboot prompt warning:world-writable config file

Source: Internet
Author: User

Today to help friends to maintain the server, in the shutdown Database command found MySQL closed, prompted warning:world-writable config file '/etc/my.cnf ' is ignored, probably means that the permissions of the global writable, any user can write. MySQL is concerned about this file being maliciously modified by other users, so ignore the configuration file. So MySQL can't shut down.

Let's look at the whole process.

Restart MySQL

The code is as follows Copy Code

[Root@ttlsa ~]
# Service Mysqld Stop
warning:world-writable config file '/etc/my.cnf ' is ignored
warning:world-writable config file '/etc/my.cnf ' is ignored
MySQL Manager or server PID file could not is found! [FAILED]


You can see that MySQL can't stop.

View permissions for MY.CNF

The code is as follows Copy Code

[Root@ttlsa ~]
# ls-l/ETC/MY.CNF
-rwxrwxrwx 1 root root 4878 June 11:31/etc/my.cnf


Permission 777, any user can be changed my.cnf, there are a lot of security risks.

Fix MySQL Problem

The code is as follows Copy Code

[Root@ttlsa ~]
# chmod 644/ETC/MY.CNF

MY.CNF is set to read and write to the user and not to be writable by other users.

Close MySQL

The code is as follows Copy Code
[Root@ttlsa ~]
# Service Mysqld Stop
Shutting down MySQL. [OK]

MySQL shutdown succeeded. The problem is simple.

Related Article

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.