mysql-186二、1820、java.sql.SQLException: Your password has expired. To log in you must change it using

以前一直运行的好好的,忽然mysql就没法工做了。请求命令后报错误:ERROR 1820 (HY000): You must SET PASSWORD before executing this statement ,使用phpMyAdmin管理工具也没法登陆,显示错误:#1862 没法登陆 MySQL 服务器php

错误解决mysql

进入mysql的服务器中使用mysql指令进行登陆及操做。sql

1.登陆mysql:mysql -uroot -proot服务器

(root是个人账号及密码)工具

2.尝试是否报1820错误,执行语句:mysql> select 1;this

(将会获得一个错误:ERROR 1820 (HY000): You must SET PASSWORD before executing this statement)spa

3.设置新密码:mysql> set password=password(‘root');.net

(因为我不须要更改密码,因此再次重置一下密码为root)code

4.再次尝试是否报1820错误,执行语句:mysql> select 1;htm

(将获得以下返回数据,说明问题已经解决了!)

?
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

相关文章
相关标签/搜索