银行Zabbix

返回zhuhaiqiang的回答

zhuhaiqiangzhuhaiqiang项目经理银行

mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 152 |
+-----------------+-------+
1 row in set (0.00 sec)

默认是152的连接数。修改方法如下:
1)临时性修改
mysql> set GLOBAL max_connections=1024;
mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 1024 |
+-----------------+-------+
1 row in set (0.00 sec)

2)永久性修改
在my.cnf文件中配置:
[mysqld] //新添加一行如下参数
max_connections=1000

重启mysql服务即可

银行 · 2020-01-07
浏览1262

回答者

zhuhaiqiang
项目经理银行
擅长领域: 服务器云计算系统运维

zhuhaiqiang 最近回答过的问题

回答状态

  • 发布时间:2020-01-07
  • 关注会员:2 人
  • 回答浏览:1262
  • X社区推广