原 MySQL数据库密码过期的处理ERROR 1820
现象
1 2 3 4 5 | Your password has expired. To log in you must change it using a client that supports expired passwords. mysql> desc mysql.user; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. |
分析
mysql.user 表中关于密码过期的字段,
password_expired:从 MySQL 5.6.6 版本开始,添加了 password_expired 功能,它允许设置用户的过期时间。
password_last_changed:密码最后一次修改的时间。