手机
当前位置:查字典教程网 >编程开发 >mysql数据库 >MySQL无法重启报错Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解决方法
MySQL无法重启报错Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解决方法
摘要:问题分析在关闭数据库的命令发现mysql关不了,提示Warning:World-writableconfigfile'/etc/my.cnf...

问题分析

在关闭数据库的命令发现mysql关不了,提示Warning: World-writable config file '/etc/my.cnf' is ignored ,大概意思是权限全局可写,任何一个用户都可以写。mysql担心这种文件被其他用户恶意修改,所以忽略掉这个配置文件。这样mysql无法关闭。

下面看下整个过程

重启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的权限

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

权限777,任何一个用户都可以改my.cnf,存在很大的安全隐患.

修复MySQL问题

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

my.cnf设置为用户可读写,其他用户不可写.

关闭MySQL

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

MySQL关闭成功. 问题很简单

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流。

【MySQL无法重启报错Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解决方法】相关文章:

Mysql 数据库更新错误的解决方法

MySQL错误“Specified key was too long; max key length is 1000 bytes”的解决办法

MySQL不支持InnoDB的解决方法

MYSQL主从库不同步故障一例解决方法

MySQL启动1053错误解决方法

mysql 数据同步 出现Slave_IO_Running:No问题的解决方法小结

mysql提示[Warning] Invalid (old?) table or database name问题的解决方法

MySQL中文乱码问题的解决方案

MySQL: mysql is not running but lock exists 的解决方法

MySQL查询和修改auto_increment的方法

精品推荐
分类导航