第一步:首先通过cmd进入mysql
在命令窗口 输入:mysql -u root -p;
第二步:更改加密方式
mysql>
alter
user
'root'
@
'localhost'
identified
by
'password'
password
expire never;
query ok, 0
rows
affected (0.10 sec)
第三步:更改密码
mysql>
alter
user
'root'
@
'localhost'
identified
with
mysql_native_password
by
'123456'
;
query ok, 0
rows
affected (0.35 sec)
mysql> flush
privileges
;
query ok, 0
rows
affected (0.28 sec)
如对本文有疑问, 点击进行留言回复!!
网友评论