资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

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://www.cdkjz.cn/article/pocsch.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220