polardbxoperatordocs/ops/configuration/2-dn-variable.md

27 lines
885 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 修改 PXC YAML
直接修改 pxc yaml 的 .spec.config.dn即可添加相关的mysql 参数,如下图所示:
```shell
# DN 相关配置
dn:
# DN my.cnf 配置,覆盖模板部分
mycnfOverwrite: |-
loose_binlog_checksum: crc32
logPurgeInterval: 5m
logDataSeparation: false
```
注意如果部分my.cnf 参数需要重启后才能生效,需要手动重启 DN 的 mysql 进程。
非 my.cnf 参数目前支持设置:
- binlog的清理时间修改 .spec.config.dn.logPurgeInterval 即可。
- 日志与数据是否分离存储,修改 .spec.config.dn.logDataSeparation 即可
## Set Global 指令
除了修改yaml 外,也可以通过 CN 的 set global 指令修改 DN 参数登录CN执行如下SQL
```shell
set ENABLE_SET_GLOBAL = true; -- 开启 set global 功能
set global {dn 参数}; -- 关闭 sql日志
```