您的位置:首页 > 技术中心 > 数据库 >

mysql 5.7.20 如何改密码

时间:2020-10-23 09:51

mysql 5.7.20改密码的方法:首先以系统管理员身份登录系统;然后打开cmd;最后通过“update user set authentication_string=password('123456') ...”命令修改密码即可。

推荐:《mysql视频教程》

mysql 5.7.20 修改root密码。

1.以系统管理员身份登陆系统。

2.打开cmd

查看mysql是否启动。 net start mysql

启动的话就停止 net stop mysql

3.跳过权限检查启动mysql.在mysql中点击bin目录,然后按住shift 右键,然后选打开命令窗口

粘贴进去 mysqld-nt --skip-grant-tables

4.用户登录 mysql -uroot -p

选择数据库 use mysql;

5. mysql5.7版本中密码字段不是password所以我们输入下面这一句 来重置密码

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

6.刷新flush privileges;

7.退出quit;并重启服务。

以上就是mysql 5.7.20 如何改密码的详细内容,更多请关注gxlsystem.com其它相关文章!

热门排行

今日推荐

热门手游