Mysql 8.0 以上版本修改密码方法

1. mysql -uroot -p

2. use mysql; 

3. update user set authentication_string='' where user='root';

4. alter user 'root'@'localhost' identified by 'newpassword';

5. flush privileges;

posted @ 2021-03-05 15:33  黒貓  阅读(228)  评论(0编辑  收藏  举报