MySQL错误: "too many connections"之解决方法

在今天上午登录系统平台时发现了这个错误,键入密码后,提示:too many connections,仅仅从字面上理解,太多连接,想了下应该不是nginx的错误,百度一下这个错误,发现和max_connections这的个参数的设置有关系。查看该参数:

show variables like '%max_connections%';

MySQL错误: "too many connections"之解决方法

151,感觉设置挺小。

再看看连接数:比较多了。。

MySQL错误: "too many connections"之解决方法

所以看看mysql的配置文件。试着把max_connections参数改大一些。这里我改成了1500

MySQL错误: "too many connections"之解决方法

更改后,重新启动mysql。

平台可以恢复正常,一个小问题,记录下。