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;  

猜你喜欢

转载自www.cnblogs.com/hupingzhi/p/11247638.html