文章目录

  • MySQL问题:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
  • 1、问题描述
  • 2、出现原因
    • 2.1 查看当前的密码策略
  • 3、可用的解决方案
    • 3.1 按照要求输入上述要求的密码
    • 3.2 更改策略:修改全局变量(临时性)
      • 3.2.1 重启mysql后失效
    • 3.3 更改策略:在my.cnf文件添加参数
    • 3.4 禁用插件
    • 3.5 删除插件

MySQL问题:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

1、问题描述

当修改mysql密码时,如果密码设置的太简单的话,会提示报错:

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

2、出现原因

  • mysql安装了validate_password密码校验插件,导致要修改的密码不符合密码策略的要求。

2.1 查看当前的密码策略

  • 策略说明
mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password_check_user_name    | OFF    |   决定是否使用该插件(及强制/永久强制使用):ON/OFF/FORCE/FORCE_PLUS_PERMANENT
| validate_password_dictionary_file    |        |   插件用于验证密码强度的字典文件路径
| validate_password_length             | 8      |   密码最小长度
| validate_password_mixed_case_count   | 1      |   密码至少要包含的小写字母个数和大写字母个数
| validate_password_number_count       | 1      |   密码至少要包含的数字个数
| validate_password_policy             | MEDIUM |   密码强度检查等级,0/LOW、1/MEDIUM、2/STRONG
| validate_password_special_char_count | 1      |   密码至少要包含的特殊字符数
+--------------------------------------+--------+
7 rows in set (0.02 sec)0/LOW:只检查长度。1/MEDIUM:检查长度、数字、大小写、特殊字符。2/STRONG:检查长度、数字、大小写、特殊字符字典文件。

3、可用的解决方案

思路:

1、遵从策略

2、修改策略

3、策略失效

3.1 按照要求输入上述要求的密码

如输入的密码为:Wxq3012@

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Wxq3012@';
Query OK, 0 rows affected (0.00 sec)

3.2 更改策略:修改全局变量(临时性)

  • 修改全局变量,但重启mysql后会失效
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
  • 在设置密码为 12345678,成功
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '12345678';
Query OK, 0 rows affected (0.00 sec)
  • 查看密码策略
mysql> SHOW VARIABLES LIKE 'validate_password%';

3.2.1 重启mysql后失效

  • 重启mysql
[root@localhost ~]# systemctl restart mysqld
  • 查看密码策略,可见策略已恢复
mysql> SHOW VARIABLES LIKE 'validate_password%';

3.3 更改策略:在my.cnf文件添加参数

my.cnf文件在所在目录:/etc/my.cnf

  • 在my.cnf文件添加参数
[root@localhost ~]# vim /etc/my.cnf...
...
validate_password_policy=0

  • 重启mysql使参数生效
[root@localhost ~]# systemctl restart mysqld
  • 查看密码策略,可见策略已更改
mysql> SHOW VARIABLES LIKE 'validate_password%';

3.4 禁用插件

  • 在my.cnf文件添加参数,禁用validate_password密码校验插件
[root@localhost ~]# vim /etc/my.cnf...
...
validate-password=OFF

  • 重启mysql使参数生效
[root@localhost ~]# systemctl restart mysqld
  • 查看密码策略,可见策略已更改
mysql> SHOW VARIABLES LIKE 'validate_password%';

3.5 删除插件

  • 删除插件
mysql> uninstall plugin validate_password;

MySQL问题:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements相关推荐

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

    环境 mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.16 | +-----------+ 报错 ...

  2. 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 解决办法: ...

  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 MySQL5.7为root用户随机 ...

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

    问题是在配置MySQL主从机时候,需要授权出现密码不满足当前政策要求(密码安全等级). 我出现错误的时候是,grant授权的时候. 首先查看一下密码安全设置 SHOW VARIABLES LIKE ' ...

  5. MySQL 8.0 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 8. ...

  6. MySQL修改root用户密码 报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    修改 root 密码 alter user user() identified by '数字 & 大写字母 & 小写字母 & 特殊符号'; 是不是觉得密码又难有复杂 没事还有办 ...

  7. 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 初始化时,使用临 ...

  8. 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环境下 ...

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

    mysql中初始密码长度为8,当你更改MySQL密码策略后 mysql> set global validate_password_policy=0; 并且设置简单好记的密码后 mysql> ...

最新文章

  1. UiBot带你两分钟看懂RPA是什么
  2. 四年级计算机课程,信息技术(四年级)全部课程PPT课件.ppt
  3. 公共界面_公共建筑东营市档案馆能耗计量分析系统
  4. group by(mysql oracle的区别) 的基本用法
  5. ym—— Android网络框架Volley(终极篇)
  6. UNIX环境高级编程之第10章:信号
  7. go语言练习:条件语句和循环语句
  8. 程序员面试宝典(一) - 流程概览
  9. 纯css制作导航下拉菜单
  10. Axure 进阶教程
  11. mybatis+mysql查询类别下的所有子类别(递归)
  12. 使用Dhtml和poi导出excle表格出现Error Type:LoadXMl Incorrect Json错误
  13. HUAWEI华为MateBook X Pro 2020 i7 16GB+512GB (MACHC-WAE9LP)原装出厂系统恢复原厂系统(送解压密码)
  14. 文件夹目录下所有的视频使用ffmpeg指定位置截图
  15. shell 生成指定范围随机数与随机字符串
  16. 数据库实验六:完整性语言实验
  17. 前端HTML调用jQuery库,属性操作:更换图片、添加字体样式(前端:HTML搭配jQuery系列教程六)
  18. 微信小程序文件直接上传阿里云OSS
  19. 检讨书应该怎么写,我来做个示范
  20. pc系统设计演变_设计师的演变

热门文章

  1. BBR_v2.0真的要来了!
  2. 【蠢哭自己系列】Linux转到桌面目录下
  3. Cesium立体建筑物闪烁效果
  4. 在Android开发板跑一个LED驱动的历程(个人笔记)
  5. D - Age of Moyu HDU - 6386 -BFS+DFS分层最短路
  6. 收拾心情,重新上路!
  7. 如何评价荣耀x30 千元真香没跑了
  8. ie8及其以下版本兼容性问题之响应式
  9. 3Dcs反恐精英java_3D反恐精英手机版
  10. python在哪个城市工资高_工程机械种类那么多,学哪个工资高呢!