First, uninstall the original MySQL system
Switch to the root user operation:
[email protected] ~]$ su
See if the operating system has a MySQL database installed:
[Email protected] carsonzhu]# Rpm-qa | grep MySQL
Mysql-libs-5.1.71-1.el6.x86_64
Then I try to delete MySQL in the following way (I'm having a problem):
[Email protected] carsonzhu]# rpm-e mysql-libs-5.1.71-1.el6.x86_64error:failed dependencies:libmysqlclient.so.16 () (64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64libmysqlclient.so.16 (libmysqlclient_16) (64bit) is needed by (installed) Postfix-2:2.6.6-2.2.el6_1.x86_64mysql-libs are needed by (installed) Postfix-2:2.6.6-2.2.el6_1. X86_64[[email protected] carsonzhu]# rpm-e mysql-libs-5.1.71-1.el6.x86_64.rpm--nodepserror:package MYSQL-LIBS-5.1.71-1.EL6.X86_64.RPM is not installed
Said to unload when there is a dependency on the package, you need to unload the postfix-2:2.6.6-2.2.el6_1.x86_64, RPM-E postfix-2:2.6.6-2.2.el6_1.x86_64 is not! Then I search for solutions (CentOS 6.3 64-bit under the thorough uninstall mysql5.5.25 illustrated tutorial) are:
If there is a CentOS self-mysql-libs-5.1.71-1.el6.x86_64 use the following command to uninstall
[Email protected] carsonzhu]# Rpm-ev--nodeps mysql-libs-5.1.71-1.el6.x86_64
[[email protected] carsonzhu]# rpm-qa|grep-i MySQL//See if MySQL has been uninstalled successfully
I found out there's nothing.
[[email protected] carsonzhu]# Find/-name MySQL//Find the previous old version of MySQL directory
Found no content
(Note: Suppose the results are as follows:
[[email protected] ~]# Find/-name MySQL
#/var/lib/mysql
#/var/lib/mysql/mysql
#/usr/lib64/mysql
Delete the corresponding MySQL directory
# Rm-rf/var/lib/mysql
# Rm-rf/var/lib/mysql
# Rm-rf/usr/lib64/mysql
/ETC/MY.CNF will not be removed after uninstallation, manual removal is required
# RM-RF/ETC/MY.CNF)
View the version of MySQL that is available for download on Yum:
[[email protected] carsonzhu]# Yum List | grep mysqlapr-util-mysql.x86_64 1.3.9-3.el6_0.1 Base bacula-director-mysql.x86_64 5.0.0-13.el6 base bacula-storage-mysql.x86_64 5.0.0-13.el6 b ASE dovecot-mysql.x86_64 1:2.0.9-19.el6_7.2 updatesfreeradius-mysql.x86_64 2.2.6-6.el6_7 updateslibdbi-dbd-mysql.x86_64 0.8.3-5.1.el6 Base mod_auth_mysql.x86_64 1:3.0.0-11.el6_0.1 Base mysql.x86_64 5 .1.73-5.el6_7.1 updatesmysql-bench.x86_64 5.1.73-5.el6_7.1 Updatesmy Sql-connector-java.noarch 1:5.1.17-6.el6 Base mysql-connector-odbc.x86_64 5.1.5 R1144-7.el6 Base mysql-devel.i686 5.1.73-5.el6_7.1 updatesmysql-devel.x86_64 5.1.73-5.el6_7.1 updatesmysql-embedded.i686 5.1.73-5.el6_7.1 updatesmysql-embedded.x86_64 5.1.73-5.el6_7.1 updatesmysql-embedded-devel.i686 5.1.73-5.el6_7.1 updatesmysql-embedded-devel.x86_64 5.1.73-5.el6_7.1 updatesmysql-libs.i686 5.1.73-5.el6_7.1 updatesmysql-libs.x86_64 5.1.73-5.el6_7.1 updatesmysql-server.x86_64 5.1.73-5.el6_7.1 updatesmysql-test.x86_64 5.1.73-5.el6_7.1 up datesphp-mysql.x86_64 5.3.3-46.el6_7.1 updatesqt-mysql.i686 1:4.6.2-28.el6_5 base qt-mysql.x86_64 1:4.6.2-28.el6_5 Base Rsyslog-mysql.x86_64 5.8.10-10.el6_6 Base rsyslog7-mysql.x86_64 7.4.10-3.el6_7.1 Updates
Linux Learning CentOS (iii): Installation and configuration of MySQL database