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.