Problem analysis
In the Shutdown database command found that MySQL can not be closed, the hint Warning: World-writable config file '/etc/my.cnf' is ignored
, probably means that the permissions of the global writable, any user could 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
[Root@ttlsa ~]# service mysqld stop
warning:world-writable config file '/etc/my.cnf ' is ignored
warning:world-w ritable config file '/etc/my.cnf ' is ignored the
MySQL Manager or server PID file could not being found![ FAILED]
You can see that MySQL can't stop.
View permissions for MY.CNF
[Root@ttlsa ~]# ls-l/etc/my.cnf
-rwxrwxrwx 1 root 4878
Permission 777, any user can be changed my.cnf
, there are a lot of security risks.
Fix MySQL Problem
[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
[Root@ttlsa ~]# service mysqld stop
shutting down MySQL. [OK]
MySQL shutdown succeeded. The problem is simple.
Summarize
The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.