Warning: World-writable config file '/etc/my.cnf' is ignored

近来FreeBSD机器上的mysql服务重启、登录mysql、使用mysqldump备份数据库时报以下错误: 

Warning: World-writable config file '/etc/my.cnf' is ignored
解决方案:
This is just a waring and can be ignored but here is the solution how to fix it
这仅仅是一个警告,并且可以被忽略。但下面是修复它的解决方案。

MySQL is deliberately ignoring your config file (my.cnf) as a safety precaution because the file can be over-written by a malicious user.
MySQL有故意忽略你的配置文件(my.cnf)作为一种安全预防措施,因为该文件是能被恶意用户重写的。

To see the file’s permissions, use the following command.
查看该文件的权限,使用如下命令
ls -l /etc/my.cnf
in response, you will see:
你能看到以下结果
-rw-r–r– 1 4998 Apr 2 2010 /etc/my.cnf【注意:此处是最后需要修改成的权限,而你看到的应该是下面描述的两种权限】

If the first part of the line looks like “-rw-rw-rw-” or “rwxrwxrwx”, the file’s permissions are “World-writable”.
如果第一部分类似 “-rw-rw-rw-” 或者 “rwxrwxrwx”,那么该文件的权限就是全局可写的。

To fix this problem, use the following command to change file’s permissions
要修改该问题,使用以下命令更改该文件的权限。

chmod 644 /etc/my.cnf
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值