TiDB Parameter Modification

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb参数修改

| username: TiDBer_hwEZA4rV

[TiDB Usage Environment] Production Environment
[TiDB Version]
6.5.2
[Reproduction Path] What operations were performed when the issue occurred
set config tidb log.level=‘warning’;
ERROR 1105 (HY000): TiDB doesn’t support to change configs online, please use SQL variables
Why can PD and TiKV be modified dynamically, but TiDB cannot, and there are no corresponding parameters found in variables?

| username: 啦啦啦啦啦 | Original post link

The image is not visible. Please provide the text you need translated.

| username: zhanggame1 | Original post link

Some parameters cannot be changed online.

| username: 啦啦啦啦啦 | Original post link

Use the tiup cluster edit-config method to modify it.

| username: DBRE | Original post link

TiDB’s configuration parameters are divided into system configuration and cluster configuration.

System Configuration (System Variables): Can be modified through the MySQL client and will be persisted to TiKV.
System configuration is divided into session, global, and instance levels:

  • Session: Only effective for the current session.
  • Global: Effective globally but not for the current session.
  • Instance level: Only effective for a specific TiDB server, such as the tidb_general_log parameter.

Cluster Configuration: Parameters for PD/TiDB-server/TiKV-server are stored in the configuration of each node and can only be modified centrally using the TiUP tool. The corresponding nodes need to be restarted for the changes to take effect.

It is recommended to study the basics of TiDB system management [TiDB v5.x] (301): 10: TiDB Configuration.

| username: 孤君888 | Original post link

I remember there are three ways to modify parameters in TiDB. The first is using set global similar to MySQL, the second is using set config, and the third is through TIUP cluster edit-config. You can try each method according to the documentation.

| username: xingzhenxiang | Original post link

Cluster parameters should not be modified using system parameters. Cluster parameters should be modified using edit-config.

| username: srstack | Original post link

After adding the parameters you want with tiup cluster edit-config <cluster-name>, use tiup cluster reload <cluster-name>.

| username: redgame | Original post link

Some are not supported.