mysql5.7 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Posted 篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 executing this statement. 需要重置密码。。。 重置就重置吧,我日结果又说我密码不安全,什么鬼,不得不说5.7的安全措施做的很到位,往往安全和方便是背道而行的。 这个其实与validate_password_policy的值有关。 validate_password_policy有以下取值: 默认是1,即MEDIUM,所以刚开始设置的密码必须符合长度,且必须含有数字,小写或大写字母,特殊字符。 首先,修改validate_password_policy参数的值 validate_password_length(密码长度)参数默认为8,我们修改为1 完成之后再次执行修改密码语句即可成功 授权远程访问 以上是关于mysql5.7 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements的主要内容,如果未能解决你的问题,请参考以下文章 mysql出现ERROR 1819 (HY000)的解决方法 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements ERROR 1819 (HY000): Your password does not satisfy the current policy requirements ERROR 1819 (HY000): Your password does not satisfy the current policy requirementsmysql> alter user root identified by \'123456\';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
有时候,只是为了自己测试,不想密码设置得那么复杂,譬如说,我只想设置root的密码为123456。
必须修改两个全局参数: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)
mysql> alter user \'root\'@\'localhost\' identified by \'123456\';
Query OK, 0 rows affected (0.00 sec)
grant all privileges on *.* to \'root\'@\'%\' identified by \'123456\' with grant option;