问题
正常执行下载命令
yum install mariadb-server mariadb
下载后执行
systemctl start mariadb
报错
Failed to start mariadb.service: Unit not found.
解决
1.停止MySQL服务
systemctl stop mysql
2.卸载MySQL软件包
yum remove mysql-server mysql-client mysql-common
3.删除MySQL数据目录
先找到mysql路径
which mysql
删除 rm -rf /usr/bin/mysql
4.删除MySQL配置文件
使用find命令来查找并删除这些文件
find / -name mysql
5.重新下载并启动
yum install mariadb-server mariadb -y
system start mariadb
最终
查看状态发现安装成功
netstat -tunlp | grep "mariadb"
觉得有用点个赞吧