下文记录了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的一句话 –nodeps 解决了:error: Failed dependencies: ————- 这样mysql就被彻底删掉了 |