1. 程式人生 > >ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supp

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supp

解決辦法:

先通過跳過授權表的方式啟動資料庫:

mysqld_safe --user=mysql--datadir=/data/mysql --skip-grant-tables --skip-networking &

這樣就可以免密碼登入了。

然後修改該使用者密碼過期策略為N:

update user set password_expired="N" where user="root"; 

flush privileges;

重啟資料庫即可。

service mysql restart