Warning: World-writable config file '/data0/mysql/3306/my.cnf' is ignored

在啓動數據庫的命令發現mysql啓動不了,提示Warning: World-writable config file ‘/etc/my.cnf’ is ignored ,大概意思是權限全局可寫,任何一個用戶都可以寫。mysql擔心這種文件被其他用戶惡意修改,所以忽略掉這個配置文件。這樣mysql無法啓動。

解決步驟如下:

1:啓動mysql時

啓動命令:/data0/mysql/3306/mysql start

出現
Warning: World-writable config file '/data0/mysql/3306/my.cnf' is ignored

2:進入/data0/mysql/3306/下  

cd /data0/mysql/3306/  

查看my.cnf權限

ls -l my.cnf

結果爲:-rwxrwxrwx 1 root  root   2218 Apr  1 18:37 my.cnf

權限777,任何一個用戶都可以改my.cnf,存在很大的安全隱患.


3:修改my.cnf的權限

chmod 664 /data0/mysql/3306/my.cnf


4:重啓mysql 服務你會發現已經OK了!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章