MySQL重启报Warning: World-writable config file ‘/etc/my.cnf’ is ignored

  今天在关闭数据库和启动数据库时发现mysql提示 Warning: World-writable config file ‘/etc/my.cnf’ is ignored 。意思是警告:全局可写配置文件'/usr/my.cnf“被忽略。

  查看/etc/my.cnf的权限是:-rwxrwxrwx 1 root root。权限777,任何一个用户都可以改my.cnf,存在很大的安全隐患。所以MySQL选择忽略这个配置文件。

  修复方法

chmod 644 /etc/my.cnf

  再次重启MySQL没有警告了。

原文地址:https://www.cnblogs.com/li-guanhua/p/13260002.html