更改MySQL5.7连接密码

操作步骤

1、登录MySQL

2、依次键入命令

use mysql

update mysql.user set authentication_string = password("你的密码") where user="用户名"

flush privileges

示例:

mysql> use mysql;

mysql> update mysql.user set authentication_string = password("root") where user="root";

mysql> flush privileges;

3、使用新密码重新登录MySQL

posted @ 2023-01-13 16:42  小贤,该上船了!  阅读(42)  评论(0)    收藏  举报