更改mysql连接个数

在使用MySQL数据库的时候,经常会遇到这么一个问题,就是“Can not connect to MySQL server. Too many connections”错误,这是因为访问MySQL且还未释放的连接数目已经达到MySQL的上限。通常,mysql的最大连接数默认是100, 最大可以达到16384。

用命令更改如下

通过root权限的mysql帐号操作

查看当前链接个数:show variables like "max_connections";

设置链接个数为300:set GLOBAL max_connections = 300;

原文地址:https://www.cnblogs.com/zqcoding/p/7121986.html