先用:yum remove mysql*命令卸載mysql及相關組件
命令:rpm -qa|grep -i mysql
可以看到如下圖的所示:
說明之前安裝了:
MySQL-client-5.5.25a-1.rhel5
MySQL-server-5.5.25a-1.rhel5
刪除命令:rpm -e –nodeps 包名
# rpm -ev MySQL-client-5.5.25a-1.rhel5
# rpm -ev MySQL-server-5.5.25a-1.rhel5<喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PC9wPgo8aDQ+M6GisunV0taux7DAz7Dmsb5teXNxbLXExL/CvKGisqLH0sm+s/3Az7Dmsb5teXNxbLXEzsS8/rrNv+I8L2g0Pgo8cD48L3A+CjxwPjwvcD4KPHA+ZmluZCAvIC1uYW1lIG15c3FsPGJyPgqy6dXSveG5+8jnz8Kjujxicj4KW3Jvb3RAbG9jYWxob3N0IH5dIyBmaW5kIC8gLW5hbWUgbXlzcWw8YnI+Ci92YXIvbGliL215c3FsPGJyPgovdmFyL2xpYi9teXNxbC9teXNxbDxicj4KL3Vzci9saWI2NC9teXNxbDwvcD4KPHA+yb6z/bbU06a1xG15c3FsxL/CvDxicj4Kcm0gLXJmIC92YXIvbGliL215c3FsPGJyPgpybSAtcmYgL3Zhci9saWIvbXlzcWw8YnI+CnJtIC1yZiAvdXNyL2xpYjY0L215c3FsPGJyPgq+38zltcSyvdboyOfNvKO6sunV0sS/wryyosm+s/08L3A+CjxpbWcgc3JjPQ=="http://www.2cto.com/uploadfile/Collfiles/20150428/2015042810131511.jpg" alt="\">
注意:卸載後/etc/my.cnf不會刪除,需要進行手工刪除
rm -rf /etc/my.cnf
rpm -qa"grep -i mysql
無結果,說明已經卸載徹底、接下來直接安裝mysql即可