your password has expired.To log in you must change itusing a client that supports expired passwords

学java当然就少不了要跟mySQL打交道,终于经历了2小时的恶心安装后,舒舒服服的敲了一天demo,第二天再来的时候发现居然mySQL又特么出幺蛾子,无法连接上了。 仔细看了一下错误原因:your password has expired.To log in you must change itusing a client that supports expired passwords。 大概意思就是:你的这个密码已经过期了,请先去修改密码。 注意这个时候你的密码其实是正确的,只是它过期了,过期了就改呗,走改去~

1.首先进入你的mySQL安装的bin目录下:

2.接着敲mysql -uroot -p 进入mysql中

3.输入你的密码 我的是root,成功后就是下面的样子滴

3.这个时候就可以开始修改你的密码了:

4.设置我们这次的密码永远不过期,记得要设置省得天天磨磨唧唧的: alter user 'root'@'localhost'password expire never

5.再保存刷新一下吧

6.滚去Navicat测试一下咯

完美~

猜你喜欢

转载自blog.csdn.net/fenniang16/article/details/81216602