(root@node01) > install component 'file://component_validate_password';
Query OK, 0 rows affected (0.08 sec)
(root@node01) > select * from mysql.component;
+--------------+--------------------+------------------------------------+
| component_id | component_group_id | component_urn |
+--------------+--------------------+------------------------------------+
| 2 | 2 | file://component_validate_password |
+--------------+--------------------+------------------------------------+
1 row in set (0.00 sec)
(root@node01) > show global variables like 'validate%';
+--------------------------------------+--------+
| Variable_name | Value |
+--------------------------------------+--------+
| validate_password.check_user_name | ON |
| validate_password.dictionary_file | |
| validate_password.length | 8 |
| validate_password.mixed_case_count | 1 |
| validate_password.number_count | 1 |
| validate_password.policy | MEDIUM |
| validate_password.special_char_count | 1 |
+--------------------------------------+--------+
7 rows in set (0.00 sec)
(root@node01) > create user 'tpcc'@'%' identified by 'abcd.1234';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
(root@node01) > create user 'tpcc'@'%' identified by 'Abcd@1234';
Query OK, 0 rows affected (0.07 sec)
(root@node01) > set global validate_password.policy=0;
Query OK, 0 rows affected (0.00 sec)
(root@node01) > create user 'tpcc'@'%' identified by 'abcd.1234';
Query OK, 0 rows affected (0.02 sec)
(root@node01) > install plugin connection_control soname 'connection_control.so';
Query OK, 0 rows affected (0.03 sec)
(root@node01) > show global variables like 'connection_control%';
+-------------------------------------------------+------------+
| Variable_name | Value |
+-------------------------------------------------+------------+
| connection_control_failed_connections_threshold | 3 |
| connection_control_max_connection_delay | 2147483647 |
| connection_control_min_connection_delay | 1000 |
+-------------------------------------------------+------------+
3 rows in set (0.01 sec)
(root@node01) > install plugin connection_control_failed_login_attempts soname 'connection_control.so';
Query OK, 0 rows affected (0.01 sec)
(root@node01) > select * from information_schema.connection_control_failed_login_attempts;
+------------+-----------------+
| USERHOST | FAILED_ATTEMPTS |
+------------+-----------------+
| 'tpcc'@'%' | 8 |
+------------+-----------------+
1 row in set (0.00 sec)
(root@node01) > show status like 'Connection_control%';
+------------------------------------+-------+
| Variable_name | Value |
+------------------------------------+-------+
| Connection_control_delay_generated | 5 |
+------------------------------------+-------+
1 row in set (0.01 sec)
标签:8.0,插件,node01,复杂度,connection,sec,validate,password,root
From: https://blog.51cto.com/dbprofessional/7240219