修改MySQL数据库密码
第一种方法
进入cmd
按Windows+x键 点击windows PwerShell进入cmd
mysqladmin -u root -p password 新密码
Enter password: 输入你的旧密码
例如下面这样
我这里设置的新密码是123456
第二种方法是
先进入 数据库
use mysql;
update use set authentication_string = password('123456') where use = 'root' and Host = 'localhost';
这里新密码依旧是123456 用时候只需要更换123456即可