1.执行如下命令
tiup cluster edit-config mytidb_cluster
添加如下段落
server_configs:
tidb:
max-server-connections: 1000
wq!保存退出,类似linux中的vim
2.reload配置(会重启动集群)
tiup cluster reload mytidb_cluster
3.查看配置
mysql> show variables like '%connect%';
+-----------------------------------------------+-----------------+
| Variable_name | Value |
+-----------------------------------------------+-----------------+
| character_set_connection | utf8 |
| collation_connection | utf8_general_ci |
| connect_timeout | 10 |
| disconnect_on_expired_password | 1 |
| init_connect | |
| max_connect_errors | 100 |
| max_connections | 10000 |
| max_user_connections | 0 |
| performance_schema_session_connect_attrs_size | 512 |
+-----------------------------------------------+-----------------+
9 rows in set (0.02 sec)