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