Data source rejected establishment of connection,message from serverToo many connections错误解决办法

发布时间 2023-08-29 09:11:21作者: 岁月记忆

1、临时修改生效,不需要重启数据库

show variables like "max_connections"; #显示最大连接数

show processlist; #显示当前连接数

 set global max_connections=1000; #设置最大连接数1000

 show variables like "max_connections"; #显示最大连接数

2、找到mysql安装目录下的my.ini,修改max_connections=1000,重启数据库就永久生效了

max_connections=1000