错误代码1862-mysql
2017-01-12 本文已影响0人
eth10
1862 - Your password has expired. To log in you must change it using a ……
问题描述
mysql密码过期(不是不对),导致连接不上数据库!
错误显示
![](https://img.haomeiwen.com/i3197538/02a129d4841d0413.png)
![](https://img.haomeiwen.com/i3197538/ffe10dccca0e7a1d.png)
windows 解决方法
- 进入安装目录的bin目录下,执行 mysql -uroot -p 进入mysql shell
![](https://img.haomeiwen.com/i3197538/e8828819e11cbfce.png)
- 执行use mysql显示情况
![](https://img.haomeiwen.com/i3197538/39fd409245e3ff71.png)
- 使用
SET PASSWORD = PASSWORD('root');
修改密码
![](https://img.haomeiwen.com/i3197538/b9157a791048d6fc.png)
此时就可以正常连接数据库了!
![](https://img.haomeiwen.com/i3197538/49642d2330afa3a1.png)
![](https://img.haomeiwen.com/i3197538/0e2f8a6314df0f5b.png)