Linux (CentOS) Uninstall MySQL Tutorial

#切换root账号
su
#关闭mysql
systemctl stop mysqld
#查找mysql相关的包
rpm -qa|grep -i mysql

 Uninstallation method 1 (applicable to MySQL installed in rpm installation mode)

 Execute the command rpm -e –nodeps package name to delete the MySQL package (delete all found packages, only one cannot be deleted)

                     (包名换成你自己查询到的)
rpm -e –nodeps community-server-8.0.32-1.el7.x86_64
The queried package name is shown in the figure (everyone's is different)

 Uninstallation method 2 (applicable to MySQL installed by yum installation)

 Execute the following commands in sequence to uninstall MySQL

                  (包名换成你自己查询到的)
yum remove community-server-8.0.32-1.el7.x86_64
 
#卸载mysql依赖
yum remove mysql-libs
yum remove mysql-server
yum remove perl-DBD-MySQL
yum remove mysql

Guess you like

Origin blog.csdn.net/Coin_Collecter/article/details/130135881