一、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):你的密碼已經(jīng)...
一、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):你的密碼已經(jīng)過期。登錄必須改變它使用一個客戶端,支持過期的密碼。
解決方法:
1、 用忽略授權表的方法進入mysql
vi /etc/my.cnf [mysqld] skip-grant-tables :wq! #保存退出
2、進入mysql,查看root用戶的詳細信息
# mysql -u root -p > use mysql > select * from mysql.user where user='root' \G
*************************** 1. row *************************** Host: localhost User: root Select_priv: Y Insert_priv: Y Update_priv: Y Delete_priv: Y Create_priv: Y Drop_priv: Y Reload_priv: Y Shutdown_priv: Y Process_priv: Y File_priv: Y Grant_priv: Y References_priv: Y Index_priv: Y Alter_priv: Y Show_db_priv: Y Super_priv: Y Create_tmp_table_priv: Y Lock_tables_priv: Y Execute_priv: Y Repl_slave_priv: Y Repl_client_priv: Y Create_view_priv: Y Show_view_priv: Y Create_routine_priv: Y Alter_routine_priv: Y Create_user_priv: Y Event_priv: Y Trigger_priv: Y Create_tablespace_priv: Y ssl_type: ssl_cipher: x509_issuer: x509_subject: max_questions: 0 max_updates: 0 max_connections: 0 max_user_connections: 0 plugin: mysql_native_password authentication_string: *AC241830FFDDC8943AB31CBD47D758E79F7953EA password_expired: N password_last_changed: 2015-11-11 16:52:49 password_lifetime: NULL account_locked: N1 row in set (0.00 sec)
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 就正常了
來源:本文內(nèi)容搜集或轉自各大網(wǎng)絡平臺,并已注明來源、出處,如果轉載侵犯您的版權或非授權發(fā)布,請聯(lián)系小編,我們會及時審核處理。
聲明:江蘇教育黃頁對文中觀點保持中立,對所包含內(nèi)容的準確性、可靠性或者完整性不提供任何明示或暗示的保證,不對文章觀點負責,僅作分享之用,文章版權及插圖屬于原作者。
Copyright?2013-2024 JSedu114 All Rights Reserved. 江蘇教育信息綜合發(fā)布查詢平臺保留所有權利
蘇公網(wǎng)安備32010402000125
蘇ICP備14051488號-3技術支持:南京博盛藍睿網(wǎng)絡科技有限公司