mysql修改密码

数据库内修改密码

MariaDB [(none)]> set password for root@localhost = password('123');

Query OK, 0 rows affected (0.00 sec)

 

MariaDB [(none)]> flush privileges;

Query OK, 0 rows affected (0.00 sec)

数据库外修改密码

旧密码修改为新密码

[root@client ~]# mysqladmin -uroot -p'123' password '123456'

posted @ 2019-05-27 13:12  #赵程#  阅读(99)  评论(0编辑  收藏  举报