mysql - mysql.user 表中的 max_connections 列有什么用?

标签 mysql linux mysql-error-1064 mysql-5.7

我们都知道:

ma​​x_connections是指所有客户端同时在mysql实例上可以创建的连接总数。

ma​​x_user_connections是指用户可以同时创建的连接总数。

那么为什么在 mysql.user 表中有一个名为 max_connections 的单独列用于所有用户?因为 ma​​x_connections 对所有用户都是相同的,并且是所有连接的全局变量?

最佳答案

来自MySQL Reference Manual :

MySQL permits limits for individual accounts on use of these server resources:

  • The number of queries an account can issue per hour
  • The number of updates an account can issue per hour
  • The number of times an account can connect to the server per hour
  • The number of simultaneous connections to the server by an account

... The server stores resource limits for an account in the user table row corresponding to the account. The max_questions, max_updates, and max_connections columns store the per-hour limits, and the max_user_connections column stores the MAX_USER_CONNECTIONS limit.

关于mysql - mysql.user 表中的 max_connections 列有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37560188/

相关文章:

php - PHP 中 Big5 转换为 UTF-8

java - 使用 mysql/connector/mxj 在 java 桌面中嵌入 MySQL

linux - 查找和计算在 Web 服务器上访问的唯一文件

linux - 求助,不知道如何制作这个Makefile

mysql - YA MySQL Error #1064 in CALL

mysql - 如何记录/写入查询执行期间发生的错误和警告

php - 如何在数据库中进行多个复选框搜索值并将其显示在同一页面上

linux - 调整大小不遵守分辨率规范

MYSQL - 正确连接我的 3 个表的语法

mysql - OrderBy 没有任何反应 mysql