MySQL更改密码
Posted shyw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL更改密码相关的知识,希望对你有一定的参考价值。
键入 mysql -u root -p 登录成功,如若已经忘记密码,查看这篇教程https://www.cnblogs.com/shyw/p/12056493.html
键入 use mysql
键入 update mysql.user set authentication_string=password(‘123456‘) where user=‘root‘; 设置数据库密码 适用于mysql 5.7版本
重启服务(要切换到mysql的bin目录!!!!!!!!)
net stop mysql;
net start mysql;
以上是关于MySQL更改密码的主要内容,如果未能解决你的问题,请参考以下文章