MySQL篇之解决启动时报错:Warning: World-writable config file ‘/etc/my.cnf’ is ignored
一、前言
当我们搭建好了MySQL服务后,有时候想要改变一些Mysql对应的配置文件等,比如改变端口、socket文件的生成位置等。
而MySQL对应的配置文件默认为/etc/my.cnf,所以需要更改一些信息,得修改/etc/my.cnf
解决启动时报错
Warning: World-writable config file ‘/etc/my.cnf’ is ignored
二、解决方案
1、#停止mysql服务
sudo /etc/init.d/mysqld stop
2、#查看my.cnf 权限
ls -l /etc/my.cnf
-rwxrwrw 1 root root 4878 Jul 30 11:31 /etc/my.cnf
3、#修复MySQL问题
chmod 644 /etc/my.cnf
# 注:my.cnf设置为用户可读写,其他用户不可写.
4、#重启mysql
sudo /etc/init.d/mysqld restart
重启后,即可发现对应的配置文件已经修改~~
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 Eternal Night
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果