记录一次mysql连接数最大告警

1、收到告警,mysql连接满了

以下是更改过程,不需要重启mysql,如果永久生效的话需要更改my.cnf文件。

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

mysql> set GLOBAL max_connections = 300;
Query OK, 0 rows affected (0.01 sec)

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

mysql> quit

  

 

posted on 2019-03-01 21:42  nmap  阅读(284)  评论(0)    收藏  举报

导航