gpt4 book ai didi

mysqld_multi : separate [mysqldN] groups into own my. cnf

转载 作者:行者123 更新时间:2023-11-29 03:26:41 25 4
gpt4 key购买 nike

我想将每个 [mysqldN]-group 分成他自己的 my.cnf

我尝试将额外的 .my.cnfmy.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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com