Mysql - Mysql5以后的版本修改密码

先登录mysql:

mysql -u root -p

 

查看用户列表:

mysql> use mysql;
mysql> select user,host from user;

 

 

 

执行修改密码:

mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123';

 

posted @ 2020-12-22 11:51  FishMan552  阅读(70)  评论(0编辑  收藏  举报