问题
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;
或者
要彻底解决问题还是要修改my.cnf配置文件
在“[mysqld]”下面添加“max_connections=1000”
执行:service mysql restart 重新启动MySQL服务