1、 卸载
rpm –qa | grep mariadb
yum remove mariadb
2、 删除遗留目录
ls /etc/my.cnf
ll /var/lib/mysql/
rm –rf /etc/my.cnf
rm –rf /var/lib/mysql/
3、 重新安装
yum install mariadb mariadb-server –y
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
mysql –u root –p
网友评论