oracle your password,MySQL 1862 - Your password has expired 解决方案

今天一台windows服务器上的程序异常,通过排查了解到是mysql的密码过期了。报错信息如下:

296131aff8cedd25032bf1e606d53ef9.png

英文ERROR我都写下来了,方便小伙伴们百度,哈哈......

1862 - Your password has expired. To log in you must change it using a client that support expired password.

以下是我网上搜索到的一些解决方法

update mysql.user set password_expired='N' where user='root';

update mysql.user set password=password("123456") where user='root'

update mysql.user set authentication_string=password('123456') where user='root' ;

update user set host = '%' where host = 'oracle' and user = 'root';

然而...并没有什么卵用(对于我当前的情况,也许对别的情况有用也说不定呢~~)

下面就来说说我的解决方法

1.ctrl+R 输入cmd 打开命令提示符

02db8fb58821bcafa7ca360bc56b54ac.png

2.输入mysql -uroot -p (若提示mysql命令不可用,请到安装目录Bin下执行)

1f97f31e173b6c5769e16d44af7301b3.png

3.输入密码登录

99aa141b8eadfd1905a70bf0d9dd7e44.png

4.修改登录密码,若有需要再次执行改回原密码

set password = password('123456')

979f1515b2d1f0a7fdbacde42483f181.png

5.连接测试,连接成功~~

4d747829f48b223f15357495c0e5e07f.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值