⭐目录

  • ​​❌一、错误展示​​
  • ​​????二、解决办法​​

❌一、错误展示

最近在做毕业设计项目,前几天连接数据库都没有遇到问题,但是今天连接数据库时一直连接不上,感觉非常纳闷,一直报如下错误:


Your password has expired. To log in you must change it using a client that supports expired passwords.


翻译了下,错误原因大概就是:


你的这个密码已经过期了,请先去修改密码。 注意这个时候你的密码其实是正确的,只是它过期了。


尝试使用idea连接MySQL,提示如下错误信息:

Your password has expired. To log in you must change it using a client that supports expired passwod_经验分享

????二、解决办法

????第一步:进入到安装Mysql的​​bin​​目录下,打开​​cmd​​:

Your password has expired. To log in you must change it using a client that supports expired passwod_其他_02

Your password has expired. To log in you must change it using a client that supports expired passwod_mysql_03

????第二步:输入如下指令 ​​mysql -u root -p​​和​​密码​​ 进入mysql中

Your password has expired. To log in you must change it using a client that supports expired passwod_经验分享_04

????第三步:输入如下指令开始修改密码 ​​set password=password('输入你要设置的密码')​

Your password has expired. To log in you must change it using a client that supports expired passwod_经验分享_05

????第四步:输入如下命令设置我们的密码永远不过期 ​​alter user 'root'@'localhost'password expire never​

Your password has expired. To log in you must change it using a client that supports expired passwod_经验分享_06

????第五步:输入如下指令保存刷新就好了!​​flush privileges;​

Your password has expired. To log in you must change it using a client that supports expired passwod_经验分享_07

至此问题就解决啦,回到对应的客户端使用新设置的密码进行登录就好啦!

Your password has expired. To log in you must change it using a client that supports expired passwod_修改密码_08


2021 年 12 月 23日
百思不得小赵
—— 新时代的农民工 ????
—— 换一种思维逻辑去看待这个世界 ????

觉得有帮助麻烦????点赞、????评论、❤️收藏啦。