创建用户,做测试想设置一个简单的密码。报错:



大概是MySQL5.7搞事情,默认安装了validate_password插件。

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 |
+--------------------------------------+--------+

validate_password_policy有以下取值:

Policy Tests Performed

0 or LOW Length

1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters

2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

默认是1,即MEDIUM,所以密码必须符合长度,且必须含有数字、小写或大写字母和特殊字符。

综上我们强制把密码设置为123456,必须修改两个全局参数:

  1. 修改validate_password_policy参数的值,使判断密码的标准仅基于密码的长度。

    mysql> set global validate_password_policy=0;

  2. 修改validate_password_length,即密码长度参数的值。其默认为8,最小为4。

--查看密码长度
mysql> select @@validate_password_length; --修改密码长度
mysql> set global validate_password_length=6;

运行结果:

参考文献:

http://www.linuxidc.com/Linux/2016-01/127831.htm

Your password does not satisfy the current policy requirements的更多相关文章

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

    为了加强安全性,MySQL5.7为root用户随机生成了一个密码,在error log中,关于error log的位置,如果安装的是RPM包,则默认是/var/log/mysqld.log. 一般可通 ...

  2. mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    注:本文来源于<  mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy r ...

  3. mysql授权报错 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    授权用户时报错,ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 原因为其实与val ...

  4. mysql ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    为了加强安全性,MySQL5.7为root用户随机生成了一个密码,在error log中,关于error log的位置,如果安装的是RPM包,则默认是/var/log/mysqld.log. 一般可通 ...

  5. mysql5.7 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    mysql5.7初次登录使用提示 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before ...

  6. 【转】ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    为了加强安全性,MySQL5.7为root用户随机生成了一个密码,在error log中,关于error log的位置,如果安装的是RPM包,则默认是/var/log/mysqld.log. 一般可通 ...

  7. mysql错误详解(1819):ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    O(∩_∩)O哈哈~ 在学习 Mysql 的时候又遇到了新问题了 o(╥﹏╥)o 当我在准备为用户授权的时候: grant all privileges on *.* to 'root'@'%' id ...

  8. mysql修改密码Your password does not satisfy the current policy requirements

    出现这个问题的原因是:密码过于简单.刚安装的mysql的密码默认强度是最高的,如果想要设置简单的密码就要修改validate_password_policy的值, validate_password_ ...

  9. mysql5.7 Your password does not satisfy the current policy requirements问题解决

    安装mysql5.7rpm包,在更改密码的时候,提示错误 这是由于Mysql5.7默认对于密码的要求强度较高,设置的密码过于简单不予通过.要解决这个问题,涉及到的参数有validate_passwor ...

随机推荐

  1. 18个你可能不相信是用CSS制作出来的东西

    与流行的看法相反,CSS不仅仅是用来提供一个WEB页面的基本风格,以使它看起来更有吸引力.还有很多其他的事情,CSS也可以做的很好.由于它创建动画和交互的能力,CSS集合HTML以及JavaScrip ...

  2. 将非官方扩展程序加入chrome的白名单

    参考来源:http://xclient.info/a/1ddd2a3a-d34b-b568-c0d0-c31a95f0b309.html com.google.Chrome.mobileconfig ...

  3. iOS textfield 限制输入字数长度

    iOS textfield限制输入的最大长度 [self.textFiled addTarget:self action:@selector(textFieldDidChange:) forContr ...

  4. aws 装机软件

  5. Github 开源:升讯威 Winform 开源控件库( Sheng.Winform.Controls)

    Github 地址:https://github.com/iccb1013/Sheng.Winform.Controls 本控件库中的代码大约写于10年前(2007年左右),难免有不成熟与欠考虑之处, ...

  6. Principal Components Regression, Pt.1: The Standard Method

    In this note, we discuss principal components regression and some of the issues with it: The need fo ...

  7. HTMLTestRunner测试报告美化

    前言 ​最近小伙伴们在学玩python,,看着那HTMLTestRunner生成的测试报告,左右看不顺眼,终觉得太丑.搜索了一圈没有找到合适的美化报告,于是忍不住自已动手进行了修改,因习惯python ...

  8. Linux笔记③(ftp、nfs、ssh服务器搭建)

    1.ftp服务器搭建(利用vsftpd这个工具) 作用:文件的上传和下载 服务器端: 修改配置文件,配置文件目录:/etc/vsftpd.conf ,修改里面的允许匿名访问.指定匿名访问目录等操作,根 ...

  9. 我的学习之路_第五章_Data,正则

    Date 类 (时间类) 所属包:java.util.Date 构造方法: public Date() 返回的是当前时间 也就是1970-1-1到电脑目前的时间值,用毫秒来表示 public Date ...

  10. datagrid 添加、修改、删除(转载)

    原链接:JQueryEasyUI学习笔记(十)datagrid 添加.修改.删除 基于datagrid框架的删除.添加与修改: 主要是批量删除,双击表单修改.选中行修改,增加行修改,再有就是扩展edi ...