How to change max_connections
You can change max_connections
while MySQL is running via SET
:
mysql> SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151|
+-----------------+-------+
1 row in set (0.00 sec)
mysql> SET GLOBAL max_connections = 201;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 201|
+-----------------+-------+
1 row in set (0.00 sec)