您好,登錄后才能下訂單哦!
這篇文章給大家介紹MySQL密碼過期該怎么辦,內(nèi)容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。
1、報錯提示
ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords;
2、解決方法
(1)停止MySQL數(shù)據(jù)庫
(2)以忽略密碼方式啟動mysql數(shù)據(jù)庫,并進入數(shù)據(jù)庫;
在my.cnf文件中的[mysqld]添加skip-grant-tables參數(shù)
(3)進入MySQL的中的mysql庫(該命令為多實例進入命令)
[root@host1 data4]# mysql -S /tmp/mysql.sock2
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.16-log MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
(4)講password_expired設(shè)置為永不過期,
mysql> update user set password_expired="N" where user="root";
Query OK, 1 row affected (5.06 sec)
Rows matched: 1 Changed: 1 Warnings: 0
(5)退出后,關(guān)閉MySQL并注銷my.cnf中的skip-grant-tables參數(shù)
進入mysql數(shù)據(jù)庫后重新配置密碼;
關(guān)于MySQL密碼過期該怎么辦就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。