java - Ubuntu 上 Docker 中的 MySQL:警告:全局可写配置文件被忽略
问题描述
根据https://dev.mysql.com/doc/refman/8.0/en/option-files.html ,在我的/etc/mysql/my.cnf
中,我有: 已!includedir /etc/mysql/mysql.conf.d
配置,并且我认为my.cnf
我的!includedir
目录中的文件应该覆盖。/etc/mysql/my.cnf
但是我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
文件包含多个点 if 可能不起作用:
https://serverfault.com/questions/918530/mysql-includedir-not-working
但我不认为我遇到了这个问题。
解决方案
请您的管理员修复权限,上游很好:
$ docker run mysql find /etc/mysql -ls
Unable to find image 'mysql:latest' locally
latest: Pulling from library/mysql
a5a6f2f73cd8: Pull complete
936836019e67: Pull complete
283fa4c95fb4: Pull complete
1f212fb371f9: Pull complete
e2ae0d063e89: Pull complete
5ed0ae805b65: Pull complete
0283dc49ef4e: Pull complete
a7e1170b4fdb: Pull complete
88918a9e4742: Pull complete
241282fa67c2: Pull complete
b0fecf619210: Pull complete
bebf9f901dcc: Pull complete
Digest: sha256:b7f7479f0a2e7a3f4ce008329572f3497075dc000d8b89bac3134b0fb0288de8
Status: Downloaded newer image for mysql:latest
4225047 0 drwxr-xr-x 3 root root 57 Nov 16 01:12 /etc/mysql
6324293 0 drwxrwxr-x 2 root root 41 Nov 16 01:10 /etc/mysql/conf.d
6324294 4 -rw-r--r-- 1 root root 1294 Oct 7 09:13 /etc/mysql/conf.d/mysql.cnf
6324308 4 -rw-rw-r-- 1 root root 43 Nov 16 01:10 /etc/mysql/conf.d/docker.cnf
4225049 4 -rw-r--r-- 1 root root 1469 Oct 7 09:13 /etc/mysql/my.cnf.fallback
4225048 4 -rw-rw-r-- 1 root root 1174 Nov 16 01:10 /etc/mysql/my.cnf
推荐阅读
- python - 如何将带有 np.column_stack/np.row_stack 的 for 循环转换为生成器
- unity3d - 无法在 Wolfram Mathematica 中打开 Unity 链接
- google-sheets - Google表格:根据其他列的条件对列进行求和
- shopify - 如何在 Shopify 中更改某些特定产品的运费?
- python - 根据另一个数据库的内容过滤数据库
- angular - ngSwitch 和 ngPlural 有什么区别 - Angular
- ios - 如何获取章节详细信息和元数据信息。从存储在设备 ios swift 中的 .m4b 文件
- reactjs - 将 css 或 scss 文件导入 Fable/F# React 组件?
- c++ - C++ 服务器 recv() 命令并不总是从客户端接收 send()
- java - 检测 Annotation 参数的完整性