How to Check and Set the MySql max connection
Check the max connection
mysql> SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
1 row in set (0.00 sec)
Set the max connection again
mysql> SET GLOBAL max_connections = 250;
Query OK, 0 rows affected (0.02 sec)
Check the max connection againmysql> SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 250 |
+-----------------+-------+
1 row in set (0.00 sec)