close
下文記錄了centos下卸載mysql的全過程。卸載過程中遇到了一些問題,所以記錄下來。

[root@host ~]# rpm -qa | grep mysql

mysql-server-5.0.95-1.el5_7.1
mysql-5.0.95-1.el5_7.1
mysql-5.0.95-1.el5_7.1
root@host ~]# rpm -e mysql-server-5.0.95-1.el5_7.1
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
[root@host ~]# rpm -e mysql-5.0.95-1.el5_7.1
error: "mysql-5.0.95-1.el5_7.1" specifies multiple packages
[root@host ~]# rpm -e --nodeps mysql mysql-server
[root@host ~]# rpm -e --allmatches mysql-5.0.95-1.el5_7.1
error: Failed dependencies:
libmysqlclient.so.15()(64bit) is needed by (installed) perl-DBD-MySQL-3.0007-2.el5.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by (installed) perl-DBD-MySQL-3.0007-2.el5.x86_64
[root@host ~]# rpm -e --allmatches --nodeps mysql-5.0.95-1.el5_7.1
warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave
[root@host ~]# rm -rf /var/lib/mysql
[root@host ~]#
以上便是我在卸載mysql時的悲慘經歷。
可能你遇到的情況不會這麽坎坷。
最後的總結是卸載mysql的一句:

rpm -e --allmatches --nodeps mysql mysql-server

rm -rf /var/lib/mysql
–allmatches 解決了:error: “mysql-5.0.95-1.el5_7.1″ specifies multiple packages
–nodeps 解決了:error: Failed dependencies:
————-
這樣mysql就被徹底刪掉了
arrow
arrow
    文章標籤
    Linux mysql 運維 數據庫
    全站熱搜
    創作者介紹
    創作者 愛在屋簷下 的頭像
    愛在屋簷下

    愛在屋簷下的部落格

    愛在屋簷下 發表在 痞客邦 留言(0) 人氣()