解决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 初始的密码策略
SHOW VARIABLES LIKE 'validate_password%';
如果遇到
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
修改策略,及密码长度
set global validate_password_policy=0 set global validate_password_length=1;
validate_password_policy取值
0 or LOW 只验证长度 1 or MEDIUM 验证长度、数字、大小写、特殊字符
2 or STRONG 验证长度、数字、大小写、特殊字符、字典文件
再次执行修改密码语句
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
问题解决