zoukankan      html  css  js  c++  java
  • 【mysql初始设置密码报错处理方法】ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    设置密码:

    mysql> set password for root@localhost = password('test123');                                                                                                  

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

    直译报错:您的密码不符合当前的政策要求(密码初始验证策略要求)

    查看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)  
    变量定义:
    1、validate_password_check_user_name:验证密码检查用户名,非必须
    2、validate_password_dictionary_file:验证密码字典文件,无要求
    3、 validate_password_length:验证密码长度,8字符
    4、validate_password_mixed_case_count:验证密码混合大小写,否
    5、validate_password_policy:验证密码策略,中等
    6、validate_password_special_char_count:验证密码特殊字符数,否
     
    报错其实与validate_password_policy的值有关,validate_password_policy有以下取值:
    Policy Tests Performe(要求)
    0 or LOW Length
    1 or MEDIUM numeric, lowercase/uppercase, and special characters
    2 or STRONG Length; numeric, lowercase/uppercase, and special characters

    默认是1,即MEDIUM,所以刚开始设置的密码必须符合长度,且必须含有数字,小写或大写字母,特殊字符。
    解决办法:
    简单2步即可解决,修改验证密码相关数据以支持简单密码设置:
    mysql> set global validate_password_length=6;                                                                                                                   
    Query OK, 0 rows affected (0.00 sec)                                                                                                                            
                                                                                                                                                                    
    mysql> set global validate_password_policy=0;                                                                                                                   
    Query OK, 0 rows affected (0.00 sec)                                                                                                                            
                                                                                                                                                               
    mysql> set password for root@localhost = password('test123');                                                                                                   
    Query OK, 0 rows affected, 1 warning (0.01 sec)
    设置密码成功。
  • 相关阅读:
    关于全志A20的Ubuntu12.04 64位系统下环境配置及编译过程笔记【转】
    使用buildroot创建自己的交叉编译工具链【转】
    什么是make config,make menuconfig,make oldconfig,make xconfig,make defconfig,make gconfig?【转】
    JZ2440专用dnw 支持xp、win7、win8和win10系统【转】
    win10 x64下的DNW驱动不完全安装方法【转】
    GlusterFS
    iOS唯一标示符引导
    lftp使用
    教你10步闯进google play排行榜前列
    ${ }的用法
  • 原文地址:https://www.cnblogs.com/Tanwheey/p/13300144.html
Copyright © 2011-2022 走看看