mysql "too many connections" 错误 之 mysql解决方法

来源:互联网 发布:vs mfc数据库编程实例 编辑:程序博客网 时间:2024/05/17 01:58

mysql "too many connections" 错误 之 mysql解决方法

解决方法无非是max_connections沾满了,
1.检查代码是否都事务是否关闭
2.设置max_connections,
show variables like "max_connections";
set global max_connections = 500;

设置立即生效,如果重启mysql,则不生效了!
3.为保险,直接设置mysql的my.ini

0 0