com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:"Too many connections"
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
异常信息:mysql连接数过多。应该更改mysql的最大连接数。
1.查看当前mysql的最大连接数:show variables like 'max_connections'
由于我的mysql服务部署在linux服务器上的,所以找到mysql的my.cnf配置文件。
2.使用linux命令更改my.cnf配置文件:sudo vi /etc/my.cnf
3.更改/加入最大连接数配置:max_connections=1000
①:首先按下insert键,如下状态:
②:输入或粘贴; max_connections=1000
③: 按下Esc键,并输入 :wq (中间有冒号:,命令行意为保存并退出)
4.使用命令重启mysql服务:systemctl restart mysqld
5.重启完成重复第1步:




A beautiful web dashboard for Linux
最近提交(Master分支:5 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
所有评论(0)