[root@10-186-64-136 3306]# cat /data/mysql/3306/my.cnf.3306 |grep password|column -t default_authentication_plugin = mysql_native_password default_password_lifetime = 365 password_history = 5 password_reuse_interval = 1 password_require_current = ON validate_password.check_user_name = ON validate_password.policy = MEDIUM validate_password.length = 25 validate_password.mixed_case_count = 2 validate_password.number_count = 2 validate_password.special_char_count = 2 10.186.64.136:3306 SQL > \s MySQL Shell version 8.0.34 Connection Id: 9 Current schema: Current user: zhenxing@10.186.64.136 SSL: Cipher in use: ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Using delimiter: ; Server version: 8.0.33 MySQL Community Server - GPL Protocol version: Classic 10 Client library: 8.0.34 Connection: 10.186.64.136 via TCP/IP TCP port: 3306 Server characterset: utf8mb4 Schema characterset: utf8mb4 Client characterset: utf8mb4 Conn. characterset: utf8mb4 Result characterset: utf8mb4 Compression: Disabled Uptime: 15.0000 sec 10.186.64.136:3306 SQL > select @@default_password_lifetime,@@password_history,@@password_reuse_interval; +-----------------------------+--------------------+---------------------------+ | @@default_password_lifetime | @@password_history | @@password_reuse_interval | +-----------------------------+--------------------+---------------------------+ | 365 | 5 | 1 | +-----------------------------+--------------------+---------------------------+ 1 row in set (0.0033 sec) 10.186.64.136:3306 SQL > SHOW VARIABLES WHERE Variable_name IN ('password_history','password_reuse_interval','default_password_lifetime'); +---------------------------+-------+ | Variable_name | Value | +---------------------------+-------+ | default_password_lifetime | 365 | | password_history | 5 | | password_reuse_interval | 1 | +---------------------------+-------+ 10.186.64.136:3306 SQL > select user,host,password_lifetime,Password_reuse_history,Password_reuse_time from mysql.user where host!='localhost' and user not in ('mysql.infoschema','mysql.session','mysql.sys'); +----------+-----------+-------------------+------------------------+---------------------+ | user | host | password_lifetime | Password_reuse_history | Password_reuse_time | +----------+-----------+-------------------+------------------------+---------------------+ | aaa | % | 365 | 5 | 1 | | bbb | % | NULL | NULL | NULL | | sysbench | % | 365 | 5 | 1 | | zhenxing | % | 365 | 5 | 1 | | backup | 127.0.0.1 | NULL | NULL | NULL | +----------+-----------+-------------------+------------------------+---------------------+ 5 rows in set (0.0010 sec) 10.186.64.136:3306 SQL > create user 'ccc' identified by '11aaBB##dsajlk$@@$jtyubin'; Query OK, 0 rows affected (0.0051 sec) 10.186.64.136:3306 SQL > select user,host,password_lifetime,Password_reuse_history,Password_reuse_time from mysql.user where host!='localhost' and user not in ('mysql.infoschema','mysql.session','mysql.sys'); +----------+-----------+-------------------+------------------------+---------------------+ | user | host | password_lifetime | Password_reuse_history | Password_reuse_time | +----------+-----------+-------------------+------------------------+---------------------+ | aaa | % | 365 | 5 | 1 | | bbb | % | NULL | NULL | NULL | | ccc | % | NULL | NULL | NULL | | sysbench | % | 365 | 5 | 1 | | zhenxing | % | 365 | 5 | 1 | | backup | 127.0.0.1 | NULL | NULL | NULL | +----------+-----------+-------------------+------------------------+---------------------+ 6 rows in set (0.0013 sec)