如何从 CentOS 7 中彻底卸载 MariaDB 5.5(包括配置)

如何从 CentOS 7 中彻底卸载 MariaDB 5.5(包括配置)

我尝试过命令

yum remove mariadb mariadb-server

它删除了客户端,但无法删除服务器。

error reading information on service mysql: No such file or directory
error: %preun(MariaDB-server-5.5.41-1.el7.centos.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package MariaDB-server-5.5.41-1.el7.centos.x86_64
error: MariaDB-server-5.5.41-1.el7.centos.x86_64: erase failed
Erasing    : MariaDB-client-5.5.41-1.el7.centos.x86_64                                                                                        1/2 
Verifying  : MariaDB-client-5.5.41-1.el7.centos.x86_64                                                                                        1/2 
Verifying  : MariaDB-server-5.5.41-1.el7.centos.x86_64                                                                                        2/2 

Removed:
MariaDB-client.x86_64 0:5.5.41-1.el7.centos                                                                                                       

Failed:
MariaDB-server.x86_64 0:5.5.41-1.el7.centos 

有什么建议么?

答案1

我重新安装了 MariaDB,然后使用響鳴不太好吃。以下是我执行的步骤-

下载所需的 RPM

wget http://archive.mariadb.org/mariadb-5.5.41/yum/centos7-amd64/rpms/MariaDB-5.5.41-centos7_0-x86_64-client.rpm
wget http://archive.mariadb.org/mariadb-5.5.41/yum/centos7-amd64/rpms/MariaDB-5.5.41-centos7_0-x86_64-common.rpm
wget http://archive.mariadb.org/mariadb-5.5.41/yum/centos7-amd64/rpms/MariaDB-5.5.41-centos7_0-x86_64-server.rpm

再次安装

rpm -ivh MariaDB-5.5.41-*.rpm

删除包

rpm -e `rpm -qa | grep MariaDB` --noscripts

删除配置文件

rm -rf /var/lib/mysql
rm /etc/my.cnf

相关内容