在我的 /etc/mysql/my.cnf
,我有:!includedir /etc/mysql/mysql.conf.d
配置,我认为 my.cnf
文件在我的!includedir
目录应该覆盖 /etc/mysql/my.cnf
, 根据 https://dev.mysql.com/doc/refman/8.0/en/option-files.html .
但我得到了一个World-writable config file /etc/mysql/mysql.conf.d/my.cnf is ignored
重新启动我的 mysql 服务器时发出警告,并确认 my.cnf
中的配置文件在我的!includedir
不工作。为什么会出现警告,如何让它发挥作用?
上下文:
Docker 中的 Ubuntu 16.04.3,mysql 5.7.22
注意:
我知道如果我的 cnf
文件包含多个点如果可能不起作用:
https://serverfault.com/questions/918530/mysql-includedir-not-working
但我不认为我遇到了那个问题。
最佳答案
将权限更改为 0444:
chmod 0444 my.cnf
然后挂载到/etc/mysql/conf.d/
:
volumes:
# Set mysql extra config:
- my.cnf:/etc/mysql/conf.d/my.cnf
关于java - Ubuntu : Warning: World-writable config file is ignored 上 Docker 中的 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53741107/