mysql-1862、1820、java.sql.SQLException: Your password has expired. To log in you must change it using a client that supports expired passwords.


之前一直運行的好好的,突然mysql就無法工作了。請求命令后報錯誤:ERROR 1820 (HY000): You must SET PASSWORD before executing this statement ,使用phpMyAdmin管理工具也無法登錄,顯示錯誤:#1862 無法登錄 MySQL 服務器

錯誤解決

進入mysql的服務器中使用mysql指令進行登錄及操作。

1.登錄mysql:mysql -uroot -proot

(root是我的帳號及密碼)

2.嘗試是否報1820錯誤,執行語句:mysql> select 1;

(將會得到一個錯誤:ERROR 1820 (HY000): You must SET PASSWORD before executing this statement)

3.設置新密碼:mysql> set password=password(‘root');

(由於我不需要更改密碼,所以再次重置一下密碼為root)

4.再次嘗試是否報1820錯誤,執行語句:mysql> select 1;

(將得到如下返回數據,說明問題已經解決了!)

?
1
2
3
4
5
6
7
mysql> select 1;
+—+
| 1 |
+—+
| 1 |
+—+
1 row in set (0.00 sec)

轉自:http://www.jb51.net/article/99079.htm


免責聲明!

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



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