22title : 配置集群参数
33description : 如何配置集群参数
44keywords : [mysql, 参数, 配置]
5- sidebar_position : 1
5+ sidebar_position : 8
66---
77
88import Tabs from ' @theme/Tabs' ;
@@ -209,7 +209,7 @@ kbcli cluster describe-config mycluster -n demo
209209 ```
210210
211211* 查看指定参数的使用文档。
212-
212+
213213 ``` bash
214214 kbcli cluster explain-config mycluster --param=innodb_buffer_pool_size --config-specs=mysql-consensusset-config -n demo
215215 ```
@@ -230,9 +230,9 @@ kbcli cluster describe-config mycluster -n demo
230230 Scope: Global
231231 Dynamic: false
232232 Type: integer
233- Description: The size in bytes of the memory buffer innodb uses to cache data and indexes of its tables
233+ Description: The size in bytes of the memory buffer innodb uses to cache data and indexes of its tables
234234 ```
235-
235+
236236 </details >
237237
238238 * Allowed Values:定义了参数的有效值范围。
@@ -352,7 +352,7 @@ kbcli cluster describe-config mycluster -n demo
352352 +-----------------+-------+
353353 1 row in set (0.04 sec)
354354 ` ` `
355-
355+
356356 ` ` ` bash
357357 mysql> show variables like ' %innodb_buffer_pool_size%' ;
358358 >
@@ -423,7 +423,7 @@ vttablet-config vttablet.cnf true vttablet-config-template
423423History modifications:
424424OPS-NAME CLUSTER COMPONENT CONFIG-SPEC-NAME FILE STATUS POLICY PROGRESS CREATED-TIME VALID-UPDATED
425425mycluster-reconfiguring-zk4b4 mycluster mysql mysql-consensusset-config my.cnf Succeed syncDynamicReload 1/1 Sep 19,2024 18:26 UTC+0800 {" my.cnf" :" {\" mysqld\" :{\" innodb_buffer_pool_size\" :\" 512M\" ,\" max_connections\" :\" 600\" }}" }
426- mycluster-reconfiguring-djdfc mycluster mysql mysql-consensusset-config my.cnf Succeed syncDynamicReload 1/1 Sep 19,2024 18:31 UTC+0800 {" my.cnf" :" {\" mysqld\" :{\" max_connections\" :\" 610\" }}" }
426+ mycluster-reconfiguring-djdfc mycluster mysql mysql-consensusset-config my.cnf Succeed syncDynamicReload 1/1 Sep 19,2024 18:31 UTC+0800 {" my.cnf" :" {\" mysqld\" :{\" max_connections\" :\" 610\" }}" }
427427` ` `
428428
429429从上面可以看到,有三个参数被修改过。
@@ -434,10 +434,10 @@ mycluster-reconfiguring-djdfc mycluster mysql mysql-consensusset-confi
434434kbcli cluster diff-config mycluster-reconfiguring-zk4b4 mycluster-reconfiguring-djdfc -n demo
435435>
436436DIFF-CONFIGURE RESULT:
437- ConfigFile: my.cnf TemplateName: mysql-consensusset-config ComponentName: mysql ClusterName: mycluster UpdateType: update
437+ ConfigFile: my.cnf TemplateName: mysql-consensusset-config ComponentName: mysql ClusterName: mycluster UpdateType: update
438438
439- PARAMETERNAME MYCLUSTER-RECONFIGURING-ZK4B4 MYCLUSTER-RECONFIGURING-DJDFC
440- max_connections 600 610
439+ PARAMETERNAME MYCLUSTER-RECONFIGURING-ZK4B4 MYCLUSTER-RECONFIGURING-DJDFC
440+ max_connections 600 610
441441innodb_buffer_pool_size 512M 512M
442442` ` `
443443
0 commit comments