如果您需要在不重新启动MySQL的情况下增加MySQL连接数,请执行以下 *** 作
mysql> show variables like 'max_connections';+-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 100 |+-----------------+-------+1 row in set (0.00 sec)mysql> SET GLOBAL max_connections = 150;Query OK, 0 rows affected (0.00 sec)mysql> show variables like 'max_connections';+-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 150 |+-----------------+-------+1 row in set (0.00 sec)
这些设置将在MySQL重新启动时更改。
对于永久更改,请在my.cnf中添加以下行,然后重新启动MySQL
max_connections = 150
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)