修改 mariadb mysql密码

重置mysql密码-Mariadb5.5

 

vim /etc/my.cnf

[mysql]

+skip-grant-tables

 

systemctl restart mariadb

 

进入mysql

use mysql 

update user set Password=password('password') where User='root'

flush privileges

退出mysql

 

vim /etc/my.cnf

[mysql]

#skip-grant-tables

systemctl restart mariadb

posted @ 2022-02-11 11:26  eminwon  阅读(186)  评论(0)    收藏  举报