广州明生堂生物科技有限公司


MySQL Variables max_user_connections 数据库 参数变量解释及正确配置使用

网络编程 MySQL Variables max_user_connections 数据库 参数变量解释及正确配置使用 10-19

本站中文解释

max_user_connections:指定每个用户最大能连接SQl数据库的次数;

设置方法:

1. 在MySQL的安装conf文件夹中找到my.cnf文件;

2. 在文件中添加“max_user_connections=数值”参数;

3. 将文件保存并重新启动MySQL;

4. 运行以下命令以检查该参数是否被更改: SHOW GLOBAL VARIABLES LIKE ‘max_user_connections’;

官方英文解释

max_user_connections

Command-Line Format--max-user-connections=#
System Variablemax_user_connections
ScopeGlobal, Session
DynamicYes
TypeInteger
Default Value0
Minimum Value0
Maximum Value4294967295

The maximum number of simultaneous connections permitted to
any given MySQL user account. A value of 0 (the default) means
no limit.

This variable has a global value that can be set at server
startup or runtime. It also has a read-only session value that
indicates the effective simultaneous-connection limit that
applies to the account associated with the current session.
The session value is initialized as follows:

  • If the user account has a nonzero
    MAX_USER_CONNECTIONS resource limit,
    the session
    max_user_connections
    value is set to that limit.

  • Otherwise, the session
    max_user_connections
    value is set to the global value.

Account resource limits are specified using the
CREATE USER or
ALTER USER statement. See
Section 6.2.16, “Setting Account Resource Limits”.


编辑:广州明生堂生物科技有限公司

标签:文件,参数,英文,重新启动,数值