dingchuang666

mysql---连接数太多 (1040 too many connection),调大连接 (亲测有用)

解决问题:mysql 1040 too many connections

 

当项目mysql数据库连接太多-报错--1040 too many connection

 

重启mysql 服务器 (systemctl restart mysqld.service)

1、mysql -u root -p 回车输入密码进入mysql

 

2、执行show variables like "max_connections"; (查询当前的最大连接数)

 

 3、执行set GLOBAL max_connections=10000; (修改最大连接数)

 

 4、执行show variables like "max_connections";  

 

 

 

此时就解决了!

 

注意:mysql服务器重启之后就会恢复默认的最大连接!

分类:

技术点:

相关文章: