【数据库错误】Data source rejected establishment of connection, message from server: “Too many connections“

 

问题

Data source rejected establishment of connection, message from server: "Too many connections"

 

原因

数据库超过最大连接数

查询当前最大连接数

select VARIABLE_VALUE from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME='MAX_CONNECTIONS'; 

 

解决方案

set global max_connections = 3600;

 

【数据库错误】Data source rejected establishment of connection, message from server: “Too many connections“_第1张图片

 

或者 

 

要彻底解决问题还是要修改my.cnf配置文件

在“[mysqld]”下面添加“max_connections=1000”

执行:service mysql restart 重新启动MySQL服务
 

 

 

 

你可能感兴趣的:(问题异常,mysql,数据库,sql,linux)