com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too many connections
show full processlist:查看有多少个线程实例
service mysqld stop
service mysqld start
show global variables like 'wait_timeout'
28800秒 = 8小时
show global variables like 'max_connections'
可以设置global
set global wait_timeout = 200;
也可以在my.cnf修改
wait_timeout=100
interactive_timeout=100
show full processlist:查看有多少个线程实例
service mysqld stop
service mysqld start
show global variables like 'wait_timeout'
28800秒 = 8小时
show global variables like 'max_connections'
可以设置global
set global wait_timeout = 200;
也可以在my.cnf修改
wait_timeout=100
interactive_timeout=100

本文介绍了解决MySQL出现Too many connections错误的方法,包括检查当前连接数、调整wait_timeout参数及max_connections配置,确保数据库连接资源得到合理利用。
914

被折叠的 条评论
为什么被折叠?



