MySQL:Yourpassworddoesnotsatisfythecurrentpolicyrequirements-成都快上网建站

MySQL:Yourpassworddoesnotsatisfythecurrentpolicyrequirements

环境:

  1. MySQL> select version();
  2. +------------+
  3. | version() |
  4. +------------+
  5. | 5.7.17-log |
  6. +------------+
  7. 1 row in set (0.00 sec)
报错:

  1. mysql> create user repl@'192.168.100.51' identified by '123456';
  2. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
出现这个问题是因为安装了插件,如下:

  1. mysql> select name,dl from mysql.plugin;
  2. +-------------------+----------------------+
  3. | name | dl |
  4. +-------------------+----------------------+
  5. | validate_password | validate_password.so |
  6. +-------------------+----------------------+
  7. 1 row in set (0.00 sec)
具体规则是:

  1. mysql> SHOW VARIABLES LIKE 'validate_password%';
  2. +--------------------------------------+--------+
  3. | Variable_name | Value |
  4. +--------------------------------------+--------+
  5. | validate_password_check_user_name | OFF |
  6. | validate_password_dictionary_file | |
  7. | validate_password_length | 8 |
  8. | validate_password_mixed_case_count | 1 |
  9. | validate_password_number_count | 1 |
  10. | validate_password_policy | MEDIUM |
  11. | validate_password_special_char_count | 1 |
  12. +--------------------------------------+--------+

插件的安装启用:
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
浏览地址:http://kswjz.com/article/pocsch.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流