Uninstall built-in mysql commands under Centos

Source: Internet
Author: User
Tags mysql commands dovecot

1. First find the Mysql-related rpm

rpm -qa | grep mysql[root@hexuweb102 ~]$ rpm -qa | grep mysql#mysql-connector-odbc-3.51.12-2.2#mysql-5.0.45-7.el5#mysql-server-5.0.45-7.el5#libdbi-dbd-mysql-0.8.1a-1.2.2

2. Start uninstall

[root@hexuweb102 ~]$ rpm -e libdbi-dbd-mysql-0.8.1a-1.2.2[root@hexuweb102 ~]$ rpm -e mysql-server-5.0.45-7.el5[root@hexuweb102 ~]$ rpm -e mysql-5.0.45-7.el5#error: Failed dependencies:#libmysqlclient.so.15 is needed by (installed) perl-DBD-MySQL-3.0007-1.fc6.i386#libmysqlclient.so.15 is needed by (installed) dovecot-1.0.7-2.el5.i386#libmysqlclient.so.15 is needed by (installed) mysql-connector-odbc-3.51.12-2.2.i386#libmysqlclient.so.15(libmysqlclient_15) is needed by (installed) perl-DBD-MySQL-3.0007-1.fc6.i386#libmysqlclient.so.15(libmysqlclient_15) is needed by (installed) dovecot-1.0.7-2.el5.i386#libmysqlclient.so.15(libmysqlclient_15) is needed by (installed) mysql-connector-odbc-3.51.12-2.2.i386#libmysqlclient_r.so.15 is needed by (installed) MySQL-python-1.2.1-1.i386#libmysqlclient_r.so.15 is needed by (installed) mysql-connector-odbc-3.51.12-2.2.i386#libmysqlclient_r.so.15(libmysqlclient_15) is needed by (installed) MySQL-python-1.2.1-1.i386#libmysqlclient_r.so.15(libmysqlclient_15) is needed by (installed) mysql-connector-odbc-3.51.12-2.2.i386#mysql is needed by (installed) MySQL-python-1.2.1-1.i386

Because the following packages depend on the mysql package, you may not be able to use other mysql packages after you delete them.

Solution:

1. Add-nodeps to unmount

rpm -e --nodeps mysql

2. Uninstall the dependency first.

[root@hexuweb102 ~]$ rpm -e perl-DBD-MySQL-3.0007-1.fc6.i386[root@hexuweb102 ~]$ rpm -e dovecot-1.0.7-2.el5.i386............

2. Deleting it with yum will automatically resolve the dependency

[root@hexuweb102 ~]yum remove mysql

We recommend that you use yum to delete or install the software. The dependency between packages is troublesome.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.