rpm -qa|``grep` `-i mysql
You can see the following picture:
Show previously installed:
MySQL-client-5.5.25a-1.rhel5
MySQL-server-5.5.25a-1.rhel5
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
If you are prompted with a dependency package error, use the following command to try
rpm -ev MySQL-client-5.5.25a-1.rhel5 --nodeps
If Prompt error: error: %preun(xxxxxx) scriptlet failed, exit status 1
Then try the following command:
rpm -e --noscripts MySQL-client-5.5.25a-1.rhel5
find` `/ -name mysql
The search results are as follows:
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
The specific steps are as shown in the figure: Find the directory and delete
Note: /etc/my.cnf will not be deleted after uninstallation and needs to be deleted manually
rm` `-rf ``/etc/my``.cnf
rpm -qa|``grep` `-i mysql
The above is the detailed content of How to completely uninstall MySQL from Linux system. For more information, please follow other related articles on the PHP Chinese website!