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用户随机生成了一个密码,在error log中,关于error log的位置,默认是/var/log/mysqld.log
获取随机密码:
grep “password” /var/log/mysqld.log
[root@instance-2lfpjykx ~]# mysql -uroot -p
输入随机密码登入mysql
修改用户密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxxxx';
出现错误:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
这个与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,所以刚开始设置的密码必须符合长度,且必须含有数字,小写或大写字母,特殊字符。
不想密码设置得那么复杂,如只想设置root的密码为123456
设置
set global validate_password_policy=0;
现在密码只需符合长度限制
validate_password_length参数默认为8,它有最小值的限制,最小值为:
Length = validate_password_number_count+validate_password_special_char_count+ (2 * validate_password_mixed_case_count)
其中,validate_password_number_count指定了密码中数据的长度,validate_password_special_char_count指定了密码中特殊字符的长度,validate_password_mixed_case_count指定了密码中大小字母的长度。这些参数,默认值均为1,所以validate_password_length最小值为4,如果你显性指定validate_password_length的值小于4,尽管不会报错,但validate_password_length的值将设为4。
mysql> set global validate_password_length = 6;
Query OK, 0 rows affected (0.00 sec)mysql> select @@validate_password_length;
+----------------------------+
| @@validate_password_length |
+----------------------------+
| 6 |
+----------------------------+
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
文章目录 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主从机时候,需要授权出现密码不满足当前政策要求(密码安全等级). 我出现错误的时候是,grant授权的时候. 首先查看一下密码安全设置 SHOW VARIABLES LIKE ' ...
- 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. ...
- 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 解决办法: ...
- MySQL:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
环境 mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.16 | +-----------+ 报错 ...
- MySQL修改root用户密码 报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
修改 root 密码 alter user user() identified by '数字 & 大写字母 & 小写字母 & 特殊符号'; 是不是觉得密码又难有复杂 没事还有办 ...
- 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 初始化时,使用临 ...
- ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
mysql中初始密码长度为8,当你更改MySQL密码策略后 mysql> set global validate_password_policy=0; 并且设置简单好记的密码后 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的解决方法如下: 在mysql环境下 ...
最新文章
- 程序员应该多逛的几个技术网站
- linux下VScode开发ESP32,VsCode设置ESP32工具链+刨根问底点灯
- 巨人网络第三季度营收5.06亿元 净利润3亿元
- 应届生开40万年薪?OPPO大手笔招揽芯片人才引热议
- php phpredis,PHP_PHP中redis的用法深入解析,redis是一个key-value存储系统。 - phpStudy...
- 随想录(qemu仿真linux kernel)
- 用Python标记识别人脸制作镂空图案的“笑脸”照片墙
- 【干货】Vray渲染器的使用方法
- 【推荐系统】电影推荐系统(一)
- java beanutil 工具类_Apache Commons BeanUtils PropertyUtils工具类操作Java Bean属性
- 测试远程服务器udp端口,测试远程udp端口
- vue中使用h5 video标签实现弹窗播放本地视频
- Latex 数学符号和公式模板整理
- 【】Microsoft Dynamics CRM Server 2011 (x86 and x64) - DVD (Chinese-Simplified)
- 8点1氪|苹果第一财季营收843亿美元;VIPKID拟融资4-5亿美元;工信部称5G终端将于年中推出...
- 利用用户行为数据——基于Spark平台的协同过滤实时电影推荐系统项目系列博客(二)
- python 基础之pymouse鼠标操作
- 程序设计与算法郭炜老师的课堂笔记1
- 广域红外望远镜的最新发现:最冷的恒星
- python拆分excel并发送邮件_python使用tkinterpandassmtplib读取Excel并发送邮件