MySQL8.0下设置简单密码出现错误提示:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

为什么要设置简单密码,不是不安全吗?因为本人内网访问的测试服务器,不想设置复杂的密码,就像简单点的密码比如root,123等。

但是新版 MySQL 8.0 加入密码安全度检测机制,导致报错。
解决方法如下

1、查看当前安全变量值,可用命令查看 validate_password 密码验证插件是否安装。

mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password.check_user_name    | ON     |
| 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.02 sec)

validate_password_length密码长度的最小值(这个值最小要是4)。
validate_password_number_count 密码中数字的最小个数。

validate_password_mixed_case_count大小写的最小个数。

validate_password_special_char_count 特殊字符的最小个数。

validate_password_dictionary_file 字典文件

2.修改变量

注意到8.0 比5.7多了带“.”的变量导致只设置一半是不够的,要想在高版本使用简单的密码,需要做这样设置:

mysql> set global validate_password.policy=0;
Query OK, 0 rows affected (0.00 sec)mysql> set global validate_password.length=1;
Query OK, 0 rows affected (0.00 sec)

然后再执行如下命令设置新的简单密码就OK了。

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

如果修改密码报错请看解决ERROR 1396 (HY000): Operation ALTER USER failed for root@localhost

解决MySQL 8.0 设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy require...相关推荐

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

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

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

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

  3. mysql 5.7 1819_MySQL 5.7设置简单密码报错ERROR 1819 (HY000)

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

  4. 解决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再修改密码时 ...

  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:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

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

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

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

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

    文章目录 MySQL问题:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 1.问题 ...

最新文章

  1. 380万播放量,也许是全网最火的机器学习视频
  2. Spring入门第五课
  3. android 自定义 进度条 旋转,Android_Android ProgressBar进度条使用详解,ProgressBar进度条,分为旋转进 - phpStudy...
  4. 服务器2016修改时间,服务器时间错误
  5. 微软Code Hunt答案(00-05)——沉迷娱乐的我
  6. 河北2021高考成绩查询具体时间,2021河北高考时间具体安排表
  7. H5和微信小程序直播开发
  8. ANSYS18的简略安装教程
  9. 获取淘宝服务器时间,用于淘宝、天猫秒杀
  10. 8.1 段子中“酷毙”了的IT行业——《逆袭大学》连载
  11. python文档:控制流(if,for,函数,lambda等)
  12. 安装和使用openBMC官网维护的qemu
  13. 如何开启Windows远程桌面服务
  14. 【poj2248】 Addition Chains(迭代加深)
  15. JAVA正则表达式判断字符串不能为空和空格、回车\n(Enter)
  16. 2022年中国医疗设备电源市场现状研究分析与发展前景预测报告
  17. CSDN写博客字体颜色、大小怎么写?
  18. Ubuntu Desktop 免费的文件 / 目录差异比较工具 (Beyond Compare 为收费软件)
  19. JAVA经验:很有启发(三)
  20. 可视化例子(12)——ECharts堆叠直方图

热门文章

  1. linux: sort用法
  2. Magento创建多语言店铺的方法
  3. cakephp 1.3 配置CakePHP
  4. PHP RSS/Feed 生成类库(支持RSS 1.0/2.0和ATOM)
  5. SqlServer2008 R2删除数据库时报数据库正在使用的错误
  6. MySQL—修改数据库root用户密码
  7. 如何添加媒体控件Windows Media Player到工具箱中
  8. javascript 西瓜一期 14 回顾 字符与编码 进制转换 数据保存
  9. python-字符串转义符号
  10. python-集合数据类型