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服务器重启之后就会恢复默认的最大连接!

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-09-18
  • 2022-02-07
  • 2022-12-23
  • 2021-12-20
猜你喜欢
  • 2021-10-21
  • 2021-11-27
  • 2022-12-23
  • 2021-06-17
  • 2021-10-11
  • 2021-11-27
  • 2022-12-23
相关资源
相似解决方案