1.mysql> SHOW VARIABLES LIKE 'validate_password%';

+--------------------------------------+--------+

| 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.01 sec)


mysql> set global validate_password.lengh=6;

ERROR 1193 (HY000): Unknown system variable 'validate_password.lengh'

mysql> set global validate_password.length=6;

Query OK, 0 rows affected (0.00 sec)


mysql> set global validate_password.policy=LOW;

Query OK, 0 rows affected (0.00 sec)


mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)


mysql> SHOW VARIABLES LIKE 'validate_password%'

   -> ;

+--------------------------------------+-------+

| Variable_name                        | Value |

+--------------------------------------+-------+

| validate_password.check_user_name    | ON    |

| validate_password.dictionary_file    |       |

| validate_password.length             | 6     |

| validate_password.mixed_case_count   | 1     |

| validate_password.number_count       | 1     |

| validate_password.policy             | LOW   |

| validate_password.special_char_count | 1     |

+--------------------------------------+-------+

7 rows in set (0.00 sec)

mysql>  

centos 8 安装mysql8.0.28 修改密码长度和复杂度_mysql

2.mysql 8.0 启动不了

rm -rf /var/lib/mysqmysql> create user 'zym2'@'%' identified with mysql_native_password by '123456'; Query OK, 0 rows affected (0.01 sec)

mysql> grant all privileges on . to 'zym2'@'%' with grant option; Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)

l

systemclt start mysql

3 插入用户

mysql> create user 'zym2'@'%' identified with mysql_native_password by '123456';

Query OK, 0 rows affected (0.01 sec)

mysql> grant all privileges on *.* to 'zym2'@'%' with grant option;

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

centos 8 安装mysql8.0.28 修改密码长度和复杂度_mysql_02

4 用navicat premium 连接数据库

centos 8 安装mysql8.0.28 修改密码长度和复杂度_mysql_03