- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想将每个 [mysqldN]-group 分成他自己的 my.cnf。
我尝试将额外的 .my.cnf 或 my.cnf 放入运行 mysqld 进程的用户主目录中。不起作用。
/etc/my.cnf:
...
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
[mysqld1]
basedir = /usr
bind-address = 127.0.0.1
character-set-server = utf8mb4
...
/home/user1/my.cnf:
[mysqld2]
basedir = /usr
bind-address = 127.0.0.1
character-set-server = utf8mb4
...
mysqld_multi report 应该报告每个服务器,它包含在/etc/my.cnf 中,例如/home/user1/my.cnf.
最佳答案
是的,可以使用 mysqld_multi :
mysqld_multi is designed to manage several mysqld processes that listen for connections on different Unix socket files and TCP/IP ports. It can start or stop servers, or report their current status.
mysqld_multi searches for groups named [mysqldN] in my.cnf (or in the file named by the --defaults-file option). N can be any positive integer. This number is referred to in the following discussion as the option group number, or GNR. Group numbers distinguish option groups from one another and are used as arguments to mysqld_multi to specify which servers you want to start, stop, or obtain a status report for. Options listed in these groups are the same that you would use in the [mysqld] group used for starting mysqld.
除了mysql的官方文档,Percona还有一篇不错的博文on this topic ,其中包含示例配置文件。
关于mysqld_multi : separate [mysqldN] groups into own my. cnf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35119961/
我想将每个 [mysqldN]-group 分成他自己的 my.cnf。 我尝试将额外的 .my.cnf 或 my.cnf 放入运行 mysqld 进程的用户主目录中。不起作用。 /etc/my.cn
我是一名优秀的程序员,十分优秀!