环境:
-
MySQL> select version();
-
+------------+
-
| version() |
-
+------------+
-
| 5.7.17-log |
-
+------------+
-
1 row in set (0.00 sec)
-
报错:
-
mysql> create user repl@'192.168.100.51' identified by '123456';
-
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
出现这个问题是因为安装了插件,如下:
-
mysql> select name,dl from mysql.plugin;
-
+-------------------+----------------------+
-
| name | dl |
-
+-------------------+----------------------+
-
| validate_password | validate_password.so |
-
+-------------------+----------------------+
-
1 row in set (0.00 sec)
具体规则是:
-
mysql> SHOW VARIABLES LIKE 'validate_password%';
-
+--------------------------------------+--------+
-
| Variable_name | Value |
-
+--------------------------------------+--------+
-
| validate_password_check_user_name | OFF |
-
| 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 |
-
+--------------------------------------+--------+
插件的安装启用:
1.插件对应的库对象文件需在配置选项plugin_dir指定的目录中。
2.可使用--plugin-load=validate_password.so在server启动时载入插件,或者将plugin-load=validate_password.so写入配置文件。
3.也可以通过如下语句在server运行时载入插件(会注册进mysql.plugins表)mysql> INSTALL PLUGIN validate_password SONAME 'validate_password.so';
为阻止该插件在运行时被删除可在配置文件中添加:
[mysqld]
plugin-load=validate_password.so
validate-password=FORCE_PLUS_PERMANENT
更多信息:https://dev.mysql.com/doc/refman/5.7/en/validate-password-plugin-installation.html
网页标题:MySQL:Yourpassworddoesnotsatisfythecurrentpolicyrequirements
URL网址:
http://cdkjz.cn/article/pocsch.html