myMySQL数据库 5.7.20 如何改密码 MySQL数据库使用教程

凤凰 2021-1-19 59 1/19

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

myMySQL数据库 5.7.20 如何改密码 MySQL数据库使用教程

推荐:《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 如何改密码的详细内容,更多请关注本站其它相关文章!

- THE END -
Tag:

凤凰

1月19日09:36

最后修改:2021年1月19日
0

非特殊说明,本博所有文章均为博主原创。