SUSE Linux下通过RPM方式卸载MySQL 5过程笔记_MySQL
1、环境
代码如下:
#OS环境
SZDB:~ # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64) - Kernel \r (\l).
#查看已安装的安装包
SZDB:~ # rpm -qa | grep -i mysql
MySQL-devel-5.5.37-1.sles10
MySQL-server-5.5.37-1.sles10
MySQL-shared-compat-5.5.37-1.sles10
MySQL-client-5.5.37-1.sles10
MySQL-shared-5.5.37-1.sles10
MySQL-test-5.5.37-1.sles10
MySQL-embedded-5.5.37-1.sles10
2、停止mysql服务
代码如下:
SZDB:~ # /etc/init.d/mysql stop
Shutting down MySQL. done
3、使用rpm卸载mysql
代码如下:
SZDB:~ # rpm -e --nodeps MySQL-server-5.5.37-1.sles10
insserv: script postgresqlMemory: service postgresql already provided!
insserv: script postgresql: service postgresql already provided!
mysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
#使用下面的方式移除所有mysql rpm包
SZDB:~ # rpm -e --nodeps MySQL-client-5.5.37-1.sles10
SZDB:~ # rpm -e --nodeps MySQL-devel-5.5.37-1.sles10
SZDB:~ # rpm -e --nodeps MySQL-shared-compat-5.5.37-1.sles10
SZDB:~ # rpm -e --nodeps MySQL-shared-5.5.37-1.sles10
SZDB:~ # rpm -e --nodeps MySQL-test-5.5.37-1.sles10
SZDB:~ # rpm -e --nodeps MySQL-embedded-5.5.37-1.sles10
4、移除相关mysql目录及文件
代码如下:
SZDB:~ # find / -name mysql
/etc/apparmor.d/abstractions/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql
/usr/local/quickfix_old/src/sql/mysql
SZDB:~ # rm -rf /etc/apparmor.d/abstractions/mysql
SZDB:~ # rm -rf /var/lib/mysql
SZDB:~ # rm -rf /var/lib/mysql/mysql
SZDB:~ # rm -rf /usr/lib64/mysql
SZDB:~ # rm -rf /usr/local/quickfix_old/src/sql/mysql
SZDB:~ # ls /etc/my*
/bin/ls: /etc/my*: No such file or directory
注,如果/etc目录下有my.cnf,也做相应移除
根据需要考虑是否移除linux下的mysql 用户
代码如下:
SZDB:~ # cat /etc/passwd | grep mysql
mysql:x:104:106:MySQL server:/var/lib/mysql:/bin/bash
5、校验结果
代码如下:
SZDB:~ # rpm -qa | grep -i mysql
SZDB:~ # chkconfig --list |grep mysql
推荐阅读
-
Linux下MySQL5.7.18 yum方式从卸载到安装过程图解
-
Linux5下安装MySQL5.6(RPM方式)_MySQL
-
SUSE Linux下通过RPM方式卸载MySQL 5过程笔记_MySQL
-
SUSE Linux下通过RPM方式卸载MySQL 5过程笔记
-
SUSE Linux下源码编译方式安装MySQL 5.6过程分享_MySQL
-
SUSE Linux下源码编译方式安装MySQL 5.6过程分享
-
SUSE Linux下源码编译方式安装MySQL 5.6过程分享_MySQL
-
Linux 5 下安装MySQL 5.6(RPM方式)
-
Linux 5 下安装MySQL 5.6(RPM方式)
-
Linux下MySQL5.7.18 yum方式从卸载到安装过程图解