Mysql 最大用户连接数错误

标签 mysql

我面临着一个非常奇怪的问题。

我正在尝试将用户连接到我的 mysql 5.5 实例,但它一直告诉我用户已经超出了 max_user_connections

ERROR 1226 (42000): User 'xpto' has exceeded the 'max_user_connections' resource (current value: 100)

但是,

show processlist

不显示该用户使用的任何连接。我很确定用户根本没有使用任何连接。 例如,如果我将当前值增加到 110,我就可以连接。然后如果我降低我就无法连接。

编辑:全局连接使用量为 500,只有少数 (10/20) 正在使用。

有什么线索吗?

最佳答案

服务器已经有太多打开的连接。 MySQL 服务器只能处理特定数量的打开连接,然后拒绝允许更多连接,并且该限制由服务器的所有用户共享。它通常设置得相当高,尽管某人很容易通过建立大量连接来有效地对 MySQL 服务器进行 DoS。

如果您收到错误消息(代码 1226),则表明整个 MySQL 服务器已耗尽连接槽 - 这是 DoS 场景。

  1. Your database must have a user ‘A’ using which you have configured your wordpress blog.
  2. Now the problem is that user ‘A’ has exceeded maximum_questions resource (current value: 40)
  3. Create a new user ‘B’ in your database through your domain control panel and update the same user name you wp-config.php file in wordpress installation directory.
  4. Now you got the problem fixed in few minutes. It will not disturb the database or the posts you have in your wordpress or phpbb.

复制自 neuronring blog

关于Mysql 最大用户连接数错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11457389/

相关文章:

mysql - SQL : How to convert REPLACE INTO . ... SELECT .... FROM 从 MySQL 到 SQL Server 的查询?

mysql - 首先按特定字段值排序

mysql_ping() c api 失败

PHP 转义 $ 符号并回显我正在获取数据库的字符串

Mysql,检查表和C中的行数

php - 计费系统应用程序的数据库设计

mysql - 在 MySql 中快速更新数千条记录

java - Hibernate 在使用@ManyToOne 的查询中返回空 hql

MySQL 按周比较

php - 优化地理数据搜索