Loading

MySQL 8.0后修改密码

 

官网链接:

https://dev.mysql.com/doc/refman/8.0/en/set-password.html

 

[root@localhost ~]# ./bin/mysql -u root -p '原来的密码'   

mysql> show databases;

mysql> use mysql;

mysql> ALTER USER '用户名'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';

mysql> flush privileges;   --刷新MySQL的系统权限相关表

mysql> exit;

 

posted @ 2024-03-02 11:31  stono  阅读(25)  评论(0编辑  收藏  举报