mysql 5.5 rpm方式解除安裝
阿新 • • 發佈:2018-11-08
首先檢視mysql服務狀態
[[email protected] data]# service mysql status
MySQL is running [SUCCESS]
如果mysql正在執行中停止mysql服務,否則不用停止
[[email protected] data]# service mysql stop
檢視有哪些mysql的rpm包
[[email protected] ~]# rpm -qa | grep -i mysql MySQL-devel-5.5.62-1.el6.x86_64 mysql-libs-5.1.71-1.el6.x86_64 MySQL-server-5.5.62-1.el6.x86_64 MySQL-client-5.5.62-1.el6.x86_64 MySQL-shared-compat-5.5.62-1.el6.x86_64 MySQL-shared-5.5.62-1.el6.x86_64
分別執行解除安裝各個rpm包命令
[[email protected] ~]# rpm -e MySQL-server-5.5.62-1.el6.x86_64
[[email protected] ~]# rpm -e MySQL-devel-5.5.62-1.el6.x86_64
[[email protected] ~]# rpm -e MySQL-client-5.5.62-1.el6.x86_64
[[email protected] ~]# rpm -e mysql-libs-5.1.71-1.el6.x86_64
[[email protected] ~]# rpm -e MySQL-shared-5.5.62-1.el6.x86_64
[[email protected] ~]# rpm -e MySQL-shared-compat-5.5.62-1.el6.x86_64
檢視mysql相關資料夾
[[email protected] ~]# find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql
刪除相關資料夾
[[email protected] ~]# rm -rf /var/lib/mysql
[[email protected] ~]# rm -rf /usr/lib64/mysql
到此解除安裝完成