欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

MySQL無(wú)法重啟報(bào)錯(cuò)Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解決方法

 更新時(shí)間:2016年12月04日 10:33:53   投稿:daisy  
最近在維護(hù)公司服務(wù)器的時(shí)候,在關(guān)閉數(shù)據(jù)庫(kù)的命令發(fā)現(xiàn)mysql關(guān)不了了,提示錯(cuò)誤為Warning: World-writable config file '/etc/my.cnf' is ignored,通過(guò)查找網(wǎng)上的資料終于解決了,現(xiàn)在將解決的方法分享給大家,同樣遇到這個(gè)問(wèn)題的朋友們可以參考借鑒。

問(wèn)題分析

在關(guān)閉數(shù)據(jù)庫(kù)的命令發(fā)現(xiàn)mysql關(guān)不了,提示Warning: World-writable config file '/etc/my.cnf' is ignored ,大概意思是權(quán)限全局可寫(xiě),任何一個(gè)用戶(hù)都可以寫(xiě)。mysql擔(dān)心這種文件被其他用戶(hù)惡意修改,所以忽略掉這個(gè)配置文件。這樣mysql無(wú)法關(guān)閉。

下面看下整個(gè)過(guò)程

重啟MySQL

[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 be found![FAILED]

可以看到mysql停止不了

查看my.cnf的權(quán)限

[root@ttlsa ~]# ls -l /etc/my.cnf
-rwxrwxrwx 1 root root 4878 Jul 30 11:31 /etc/my.cnf

權(quán)限777,任何一個(gè)用戶(hù)都可以改my.cnf,存在很大的安全隱患.

修復(fù)MySQL問(wèn)題

[root@ttlsa ~]# chmod 644 /etc/my.cnf

my.cnf設(shè)置為用戶(hù)可讀寫(xiě),其他用戶(hù)不可寫(xiě).

關(guān)閉MySQL

[root@ttlsa ~]# service mysqld stop
Shutting down MySQL..[ OK ]

MySQL關(guān)閉成功. 問(wèn)題很簡(jiǎn)單

總結(jié)

以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來(lái)一定的幫助,如果有疑問(wèn)大家可以留言交流。

相關(guān)文章

最新評(píng)論