How to uninstall mysql in linux
1. Check whether mysql is installed before.
Run the: yum remove mysql * command to uninstall mysql and related components.
Command: rpm-qa | grep-I mysql
As shown in:
Note:
MySQL-client-5.5.25a-1.rhel5
MySQL-server-5.5.25a-1.rhel5
2. Stop the mysql service and delete the previously installed mysql
DELETE command: rpm-e-nodeps package name
# 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 + examples/CvKGisqLH0sm + s/example/rrNv + examples + yb6z/examples + examples/wryyosm + s/08L3A + cjxpbWcgc3JjPQ = "http://www.2cto.com/uploadfile/Collfiles/20150428/2015042810131511.jpg" alt = "\">
Note: After uninstallation,/etc/my. cnf is not deleted and must be manually deleted.
Rm-rf/etc/my. cnf
4. Check whether mysql is installed on the machine again.
Rpm-qa "grep-I mysql
No results. It indicates that the installation is complete, and you can install mysql directly.