Linux rpm刪除MySQL

1、查找哪些已經被安裝了:

my-linux: # rpm -qa |grep -i mysql
MySQL-client-5.6.23-1.sles11.x86_64
MySQL-server-5.6.23-1.sles11.x86_64
MySQL-shared-5.6.23-1.sles11.x86_64
MySQL-devel-5.6.23-1.sles11.x86_64

2、逐個卸載:

my-linux: # rpm -e --nodeps MySQL-client-5.6.23-1.sles11.x86_64
my-linux: # rpm -e --nodeps MySQL-server-5.6.23-1.sles11.x86_64
redirecting to systemctl stop mysql.service


Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.


If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.


mysql                     0:off  1:off  2:off  3:off  4:off  5:off  6:off

my-linux: # rpm -e --nodeps MySQL-shared-5.6.23-1.sles11.x86_64
my-linux: # rpm -e --nodeps MySQL-devel-5.6.23-1.sles11.x86_64

3、確認卸載結果:

my-linux: # rpm -qa |grep -i mysql
my-linux: # 


4、刪除數據文件(假設目錄爲:mysql):

my-linux: # rm -rf mysql

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章