Uninstall MySQL under Linux

Miss Zhu 2022-02-13 08:39:02 阅读数:651

uninstall mysql linux

CentOS7 Intermediate unloading MySQL:
1, View the in the system mysql:

rpm -qa|grep -i mysql

 Insert picture description here
Delete... In turn :

rpm -ev mysql-community-libs-compat-5.7.35-1.el7.x86_64 --nodeps
rpm -ev mysql-community-server-5.7.35-1.el7.x86_64
rpm -ev mysql57-community-release-el7-11.noarch
rpm -ev mysql-community-client-5.7.35-1.el7.x86_64
rpm -ev mysql-community-libs-5.7.35-1.el7.x86_64
rpm -ev mysql-community-common-5.7.35-1.el7.x86_64

Use the command to view all on the disk mysql file

 find / -name mysql

 Insert picture description here
Delete... In turn :

rm -rf /etc/selinux/targeted/active/modules/100/mysql
rm -rf /etc/selinux/targeted/tmp/modules/100/mysql
rm -rf /var/lib/mysql
rm -rf /usr/share/mysql

Check again if there is mysql:

rpm -qa|grep -i mysql

Found no , Then the deletion is completed .

copyright:author[Miss Zhu],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130839002907.html