Mysql:mysql 5.X 报错 ERROR 1193 (HY000): Unknown system variable ‘validate_password_length‘

The error message is as follows:

mysql> set global validate_password_length=4;
ERROR 1193 (HY000): Unknown system variable 'validate_password_length'
mysql> set global validate_password_policy=0;
ERROR 1193 (HY000): Unknown system variable 'validate_password_policy'

The reasons are as follows:

The validate_password plug-in is not activated, and the official document is posted, the address is as follows:

MySQL :: MySQL 5.7 Reference Manual :: 6.4.3.1 Password Validation Plugin Installation

solution:

Modify the configuration my.conf file

vim /etc/my.conf

plugin-load-add=validate_password.so
validate-password=FORCE_PLUS_PERMANENT

 

restart mysql

systemctl restart mysql

Finally, enter mysql and re-enter it.

 

Guess you like

Origin blog.csdn.net/u013938578/article/details/130190754