在引入SpringBoot项目中 Druid 连接池后,启动服务,控制台显示错误: java.sql.SQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections" 解决方法: 1、重启mysql服务,Linux下命令:service mysqld restart 2、 进入MySQL,输入命令查看当前数据库支持的最大连接数: show variables like 'max_connections'; 3、 更改最大连接数修:set global max_connections=1000;
记录引入Druid后,启动服务提示java.sql.SQLNonTransientConnectionException: Data source rejected 错误
最新推荐文章于 2024-04-18 01:00:00 发布