zoukankan      html  css  js  c++  java
  • ERROR 1819 (HY000) Your password does not satisfy the current policy requirements

    ERROR 1819 (HY000) Your password does not satisfy the current policy requirements

    mysql> create user 'test1'@'localhost' identified by '123456';
    ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
    

    原因:密码策略问题

    解决办法:
    1.查看mysql初始的密码策略

    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     |
    +--------------------------------------+-------+
    7 rows in set (0.00 sec)
    

    2.设置密码的验证强度等级,设置validate_password_policy的全局参数为LOW
    (修改为low后,就只验证密码的长度)

    mysql> set global validate_password_policy=LOW;
    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             | LOW   |
    | validate_password_special_char_count | 1     |
    +--------------------------------------+-------+
    7 rows in set (0.00 sec)
    

    3.修改密码长度

    mysql> set global validate_password_length=6;
    mysql> show variables like 'validate_password%';
    +--------------------------------------+-------+
    | Variable_name                        | Value |
    +--------------------------------------+-------+
    | validate_password_check_user_name    | OFF   |
    | 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.01 sec)
    

    4.验证

    mysql> create user 'test1'@'localhost' identified by '123456';
    Query OK, 0 rows affected (0.06 sec)
    
    作者:ccku
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。如有问题或建议,请多多赐教,非常感谢。
  • 相关阅读:
    T3984 迷宫问题 TJ
    P1091 合唱队形 TJ
    P4549 【模板】裴蜀定理
    牛客NOIP集训一S 牛牛的方程式 TJ
    P3387 【模板】缩点 TJ
    [数字图像处理](三)对数变换
    [数字图像处理](四)直方图均衡化[HE]算法
    [ACM]KMP算法的两种写法,从0开始,从1开始
    [计算几何]补题
    [Servlet]IJ idea搭建Servlet初步
  • 原文地址:https://www.cnblogs.com/ccku/p/13436708.html
Copyright © 2011-2022 走看看