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';
先登录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';