启动mysql时报错信息如下: [root@localhost ~]# Warning: World-writable config file '/data1/mysql/3306/my.cnf' i

如果在启动warning: World-writable config file /home/mysql/my.cnf is ignored
原因:my.cnf的读取权限进行了设置,不允许World-writable(字面意思是全世界都可读写)
解决方法:

sudo chmod 644 /home/mysql/my.cnf


How to fix World-writable config file /etc/my.cnf is ignored?

You may get this error after trying to backup your mysql database using mysqldump command

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

or sometime when yoy start  Xampp, you may see error like this:

Starting XAMPP for Linux …
XAMPP: Starting Apache with SSL (and PHP5)…
XAMPP: Starting MySQL…
XAMPP: Starting ProFTPD…
warning: World-writable config file /etc/my.cnf is ignored
warning: World-writable config file /etc/my.cnf is ignored
warning: World-writable config file /etc/my.cnf is ignored
XAMPP for Linux started.

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.

To see the file’s permissions, use the following command.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”.

To fix this problem, use the following command to change file’s permissions

chmod 644 /opt/lampp/etc/my.cnf

Note: if you looking for a way to backup your Mysql database via ssh and mysqldump, then please read my previous post about how to backup your online website and clone or sync it to local website

Do you need farther help on this topic? Contact me
Do you need Professional coder? Hire me
Looking for different WordPress plugin? Try Wishlist member


Andy is one of core WordPress WishList Member Developer. He is in love with WordPress and fun of turning new ideas to WordPress plugin or theme.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值