问题:
mysql> show databases;ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
处理:
方法1. [https://dev.mysql.com/doc/refman/5.6/en/alter-user.html]mysql> SET PASSWORD = PASSWORD('123456');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PASSWORD('123456')' at line 1
mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
方法2: [popexizhi: 版本问题是个大大的坑,以后看帮助一定要注意版本啊,pope安装的8.0 用5.6的方法是处理不了的啊,的啊,的啊 :)]
[https://dev.mysql.com/doc/refman/8.0/en/password-management.html]mysql> SET PERSIST default_password_lifetime = 0;
Query OK, 0 rows affected (0.00 sec)
mysql> ALTER USER USER() IDENTIFIED BY '123$%^qwe';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> alter user USER() IDENTIFIED BY '123$%^QWErty';
Query OK, 0 rows affected (0.06 sec)
没有评论:
发表评论