unbutu上my.cnf权限问题

来源:互联网 发布:zebra标签打印软件 编辑:程序博客网 时间:2024/06/06 02:16

从别的机器将my.cnf拷贝到指定的机器上后,将权限粗暴的直接改为777,重新启动mysql发现无法启动,提示如下:

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


这主要是my.cnf权限问题,按照mysql的要求,需要将其权限改成644,即可。

 chmod 644  /etc/my.cnf


在unbuntu终端上搜索my.cnf,存在以下几个地方:

/etc/my.cnf/usr/local/mysql/mysql-test/suite/federated/my.cnf/usr/local/mysql/mysql-test/suite/rpl/my.cnf/usr/local/mysql/support-files/my.cnf

这些文件的使用顺序可通过如下命令查询: ./mysqld --verbose --help | grep -A 1 'Default options'

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf