轉自http://hi.baidu.com/myphpzone/blog/item/562e496f0dfbb1d680cb4a2d.html
linux下MySQL解除安裝方法
一.源碼安裝的解除安裝方法:
到源碼目錄,如果可以運作make uninstall就可以解除安裝。如果沒有,就直接删除。
如果是./configure --prefix指定了目錄用 rm -rf 目錄名 删除
-------------------------------------------------------------
[[email protected] ~]# cd /usr/local/src/mysql-5.1.45
[[email protected] mysql-5.1.45]# make uninstall
[[email protected] mysql-5.1.45]# cd ..
[[email protected] src]# rm -rf mysql-5.1.45
[[email protected] src]# cd ..
[[email protected] local]# ls
bin etc games include lib libexec mysql sbin share src web
[[email protected] local]# rm -rf mysql/
[[email protected] local]# ls
bin etc games include lib libexec sbin share src web
[[email protected] local]#
-------------------------------------------------------------
二.rpm方式安裝的解除安裝方法:
檢視是否安裝mysql的指令
rpm -qa | grep mysql
然後 逐個使用 rpm -e mysq-* 解除安裝
如果出現
error: Failed dependencies:
libmysqlclient.so.10 is needed by (installed) libdbi-dbd-mysql-0.6.5-10.RHEL4.1.i386
libmysqlclient.so.10 is needed by (installed) MySQL-python-1.0.0-1.RHEL4.1.i386
libmysqlclient.so.10 is needed by (installed) MyODBC-2.50.39-21.RHEL4.1.i386
libmysqlclient.so.10 is needed by (installed) qt-MySQL-3.3.3-9.3.i386
mysqlclient10 is needed by (installed) MySQL-python-1.0.0-1.RHEL4.1.i386
mysqlclient10 = 3.23.58-4.RHEL4.1 is needed by (installed) mysqlclient10-devel-3.23.58-4.RHEL4.1.i386
時,使用 --nodeps 參數,如:
rpm -e mysqlclient10-devel-3.23.58-4.RHEL4.1 --nodeps
rpm -e mysqlclient10-3.23.58-4.RHEL4.1 --nodeps