MySQL cannot restart and reports the following error: Warning: World-writable config file '/etc/my. cnf' is an ignored solution: my. cnfisignored
Problem Analysis
The command for shutting down the database finds that mysql cannot be shut down, promptingWarning: World-writable config file '/etc/my.cnf' is ignored The permission is globally writable and can be written by any user. Mysql ignores this configuration file because it is maliciously modified by other users. In this way, mysql cannot be closed.
Next, let's take a look at the entire process.
Restart MySQL
[root@ttlsa ~]# service mysqld stopWarning: World-writable config file '/etc/my.cnf' is ignoredWarning: World-writable config file '/etc/my.cnf' is ignoredMySQL manager or server PID file could not be found![FAILED]
Mysql cannot be stopped.
View Permissions Of my. cnf
[root@ttlsa ~]# ls -l /etc/my.cnf-rwxrwxrwx 1 root root 4878 Jul 30 11:31 /etc/my.cnf
Permission 777, which can be changed by any usermy.cnfThere are great security risks.
Fix MySQL Problems
[root@ttlsa ~]# chmod 644 /etc/my.cnf
My. cnf is set to allow users to read and write, while other users cannot write.
Disable MySQL
[root@ttlsa ~]# service mysqld stopShutting down MySQL..[ OK ]
MySQL is closed successfully. The problem is very simple.
Summary
The above is all about this article. I hope this article will help you in your study or work. If you have any questions, please leave a message.