honey01

近在用SpringMVC开发的时候,突然出现1040 too many connection的错误,看错误的意思是连接的人数太多了。百度经验:jingyan.baidu.com

方法/步骤

 
  1. 1

    当最大连接数比较小时,可能会出现“1040 too many connection”错误。

    首先需要重启mysql服务,执行命令:service mysql restar

    也有可能是:service mysqld restart

  2. 2

    登录mysql:mysql -uroot -p

    输入密码,回车;

  3. 3

    登录成功后执行以下语句查询当前的最大连接数:select VARIABLE_VALUE from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME=\'MAX_CONNECTIONS\';

  4. 4

    执行以下语句修改最大连接数:set global max_connections = 3600;

分类:

技术点:

相关文章:

  • 2021-09-01
  • 2021-05-10
  • 2021-12-11
  • 2021-11-13
  • 2021-09-25
  • 2021-11-27
  • 2021-10-27
  • 2021-10-15
猜你喜欢
  • 2021-10-21
  • 2021-11-27
  • 2021-06-17
  • 2021-08-22
  • 2021-07-28
  • 2021-11-27
  • 2021-06-15
相关资源
相似解决方案