max_user_connections参数设置试验
user max 参数设置 试验 connections
2023-09-14 09:01:14 时间
--查看当前max_user_connections连接参数值为0,表示没有限制.
mysql> show global variables like '%connect%'; +--------------------------+-----------------+ | Variable_name | Value | +--------------------------+-----------------+ | character_set_connection | utf8 | | collation_connection | utf8_general_ci | | connect_timeout | 10 | | init_connect | | | max_connect_errors | 10 | | max_connections | 160 | | max_user_connections | 0 | +--------------------------+-----------------+ 7 rows in set (0.00 sec) --设置max_user_connections值为2 mysql> set global max_user_connections=2; Query OK, 0 rows affected (0.00 sec) --查看设置是否生效 mysql> show global variables like '%connect%'; +--------------------------+-----------------+ | Variable_name | Value | +--------------------------+-----------------+ | character_set_connection | utf8 | | collation_connection | utf8_general_ci | | connect_timeout | 10 | | init_connect | | | max_connect_errors | 10 | | max_connections | 160 | | max_user_connections | 2 | +--------------------------+-----------------+ 7 rows in set (0.00 sec) --退出数据库 mysql> exit Bye --登录数据库 C:\Users\ArcerZhang>mysql -uroot -parcerzhang Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.5.28 MySQL Community Server (GPL) Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. --查看数据库 mysql> show global variables like '%connect%'; +--------------------------+-----------------+ | Variable_name | Value | +--------------------------+-----------------+ | character_set_connection | utf8 | | collation_connection | utf8_general_ci | | connect_timeout | 10 | | init_connect | | | max_connect_errors | 10 | | max_connections | 160 | | max_user_connections | 2 | +--------------------------+-----------------+ 7 rows in set (0.00 sec) mysql>
二、登录第一个窗口
C:\Users\ArcerZhang>mysql -uroot -parcerzhang Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.5.28 MySQL Community Server (GPL) Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
三、登录第二个窗口
C:\Users\ArcerZhang>mysql -uroot -parcerzhang ERROR 1203 (42000): User root already has more than 'max_user_connections' active connections C:\Users\ArcerZhang>
四、结论
当max_user_connections设置为2时,使用一个用户登录mysql server,当开启第二窗口登录时,就会报错了.而且第一个试验窗口也算是一个用户登录.
相关文章
- 随机获取User-Agent
- ansible之user模块
- 3ds MAX下载 3ds MAX免费下载3ds Max 2023最新版安装包下载+详细安装教程
- 3DS Max渲染器V-ray最新版6.0:Chaos V-Ray for 3ds max 2020-2023版安装教程
- MySQL Error number: MY-013494; Symbol: ER_WARN_LOG_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST; SQLSTATE: HY000 报错 故障修复 远程处理
- Oracle 视图 USER_ANALYTIC_VIEW_LVL_CLS 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_FLASHBACK_ARCHIVE 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_MEASURE_FOLDER_CONTENTS 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_MVIEW_LOGS 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_MVREF_RUN_STATS 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_OBJECTS 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_OPERATOR_COMMENTS 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_PRIVATE_TEMP_TABLES 官方解释,作用,如何使用详细说明
- Oracle 视图 USER_SR_STLOG_EXCEPTIONS 官方解释,作用,如何使用详细说明
- MySQL Variables max_user_connections 数据库 参数变量解释及正确配置使用
- Linux删除用户的简易指南(linux删除user)
- Discovering the Linux User Path: A Guide to Navigating Your Way to Success(linux用户路径)
- 深入解析MySQL中MAX函数的使用方法(mysql中max的用法)
- 间Oracle MAX追求极致空间管理技术(oracle max 空)
- 数据表 Oracle MAX 合并两个数据表的实践研究(oracle max两个)