关于max_user_connection的问题

剑心永远OK 2012-03-11 02:09:20
网站老出现

user 'test' has exceeded the 'max_user_connections' resource (current value:2)

查看了一下配置,配置的max_user_connections为25,为什么上面显示是为2呢?

show status like '%max%';
也没有显示出max_user_connections的值
只显示了max_connections的值?

而且访问人数非常的少。

...全文
483 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuxinran819 2012-03-13
  • 打赏
  • 举报
回复
查看mysql.user表的max_user_connections列,对于‘test’这一行,应该可以看到它的值。把它设置成0就可以打破限制了。语句是:
grant usage on *.* to test max_user_connections=0;
这样设置以后,该用户同时在线限制值就是你的系统变量max_user_connections的值,如果你再把这个值也置为0,那么就完全没有限制了。
另外,你应该show global variables like 'max_user_connections';
ACMAIN_CHM 2012-03-11
  • 打赏
  • 举报
回复
检查一下这个用户的最大连接数。MYSQL中可以针对每个用户设置用这个用户账号的最大连接数。以防止一个用户把的所有资源都占用。
rucypli 2012-03-11
  • 打赏
  • 举报
回复
show variables like '%max%';


show processlist看看有都少个用户连接

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧