CentOS7管理MariaDB

systemctl start mariadb #启动MariaDB
systemctl stop mariadb #停止MariaDB
systemctl restart mariadb #重启MariaDB
systemctl enable mariadb #设置开机启动

 

 

修改密码

 

用UPDATE直接编辑user表   

首先登录MySQL。  

use mysql;  

update user set password=password('123') where user='root' and host='localhost';  

flush privileges;  

posted @ 2019-07-25 23:18  最爱番茄炒蛋  阅读(181)  评论(0编辑  收藏  举报