问题现象 :
mysql> use mysql;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
1.首先,修改validate_password_policy参数的值:
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
2.validate_password_length(密码长度)参数默认为8,我们修改为1
mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
3,完成之后再次执行修改密码语句即可成功
mysql> alter user 'root'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.00 sec)