您当前的位置: 首页 >  windows

少林码僧

暂无认证

  • 2浏览

    0关注

    317博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

windows下mysql5.7忘记root密码后的解决方法

少林码僧 发布时间:2017-05-30 20:20:40 ,浏览量:2

添加windows下mysql服务

以管理员身份打开cmd,执行

mysqld --install

net stop mysql

# 忘记密码找回

my.ini 的mysqld下添加

skip-grant-tables

# 启动mysql服务

net start mysqld

cd C:\Program Files\MySQL\MySQL Server 5.7\bin

mysql

use mysql

设置新密码

update mysql.user set authentication_string=password('yongge999???') where user='root' and Host = 'localhost';

flush privileges;

5.7以前版本可用UPDATE user SET Password=PASSWORD('newpassword') where USER='root';更新密码

关注下方公众号获取更多优质文章

关注
打赏
1661398670
查看更多评论
立即登录/注册

微信扫码登录

0.0380s