Max_user_connections parameter Setting test

Source: Internet
Author: User

--View the current max_user_connections connection parameter value of 0, which means there is no limit.
Mysql>Show global variables like '%connect%';+--------------------------+-----------------+|Variable_name|Value|+--------------------------+-----------------+|Character_set_connection|Utf8||Collation_connection|Utf8_general_ci||Connect_timeout| Ten ||Init_connect| ||Max_connect_errors| Ten ||Max_connections| the ||Max_user_connections| 0 |+--------------------------+-----------------+7Rowsinch Set(0.00sec) --Set max_user_connections value to 2MySQL> SetGlobal Max_user_connections=2; Query OK,0Rows Affected (0.00sec) --Check if the settings are active MySQL>Show global variables like '%connect%';+--------------------------+-----------------+|Variable_name|Value|+--------------------------+-----------------+|Character_set_connection|Utf8||Collation_connection|Utf8_general_ci||Connect_timeout| Ten ||Init_connect| ||Max_connect_errors| Ten ||Max_connections| the ||Max_user_connections| 2 |+--------------------------+-----------------+7Rowsinch Set(0.00sec) --quit database MySQL> ExitBye--Login database C:\Users\ArcerZhang>Mysql-Uroot-Parcerzhangwelcome toThe MySQL Monitor. CommandsEnd with;or\g.your MySQL Connection ID is 7Server Version:5.5. -MySQL Community Server (GPL) Copyright (c) -, -, Oracleand/orits affiliates. Allrights reserved. Oracle isA registered trademark ofOracle Corporationand/oritsaffiliates. Names may trademarks oftheir respectiveowners. Type'Help ;' or '\h' forHelp. Type'\c' toClear the Currentinput statement. --View database MySQL>Show global variables like '%connect%';+--------------------------+-----------------+|Variable_name|Value|+--------------------------+-----------------+|Character_set_connection|Utf8||Collation_connection|Utf8_general_ci||Connect_timeout| Ten ||Init_connect| ||Max_connect_errors| Ten ||Max_connections| the ||Max_user_connections| 2 |+--------------------------+-----------------+7Rowsinch Set(0.00sec) MySQL>
Second, login to the first window
C:\Users\ArcerZhang>Mysql-Uroot-Parcerzhangwelcome toThe MySQL Monitor. CommandsEnd  with;or\g.your MySQL Connection ID is 8Server Version:5.5. -MySQL Community Server (GPL) Copyright (c) -, -, Oracleand/orits affiliates. Allrights reserved. Oracle isA registered trademark ofOracle Corporationand/oritsaffiliates. Names may trademarks oftheir respectiveowners. Type'Help ;' or '\h'  forHelp. Type'\c'  toClear the Currentinput Statement.mysql>

Third, login to the second window

C:\Users\ArcerZhang>-1203 (42000User'  max_user_connections'  active Connectionsc:\users\arcerzhang>
Iv. Conclusion

When Max_user_connections is set to 2 o'clock, log in to MySQL server with a user, and when the second window is turned on, the error will be made. and the first Test window is a user login.

Max_user_connections parameter Setting test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.