mysql密碼過期 ERROR 1862 (HY000):


環境:

ubuntu14.04  mysql5.7

 

一、mysql5.7 密碼過期問題

報錯:

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

翻譯:

錯誤1862(HY000):你的密碼已經過期。登錄必須改變它使用一個客戶端,支持過期的密碼。

 

解決方法:

1、 用忽略授權表的方法進入mysql 

        vi /etc/my.cnf      [mysqld]      skip-grant-tables  

2、進入mysql,查看root用戶的詳細信息

# mysql -u root -p   > use mysql        
> select * from mysql.user where user="root" \G
*************************** 1. row ***************************                 

3、把password_expired 改成不過期

        >  update user set password_expired="N" where user="root";        > flush privileges;        > quit

4、把 /etc/my.cnf 的 skip-grant-tables 這行注釋掉

5、重啟服務

     #service mysql restart

6、再次登陸 mysql 就正常了

 

COME FROM:http://blog.sina.com.cn/s/blog_58de85690102x77h.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM