第一種方式卸載:yum卸載
查看yum是否安裝過mysql
yum list installed mysql*
yum命令卸載
yum remove MySQL-client MySQL-devel MySQL-embedded MySQL-server MySQL-shared MySQL-shared-compat MySQL-test rm -rf /var/lib/mysql rm /etc/my.cnf
第二種方式卸載:rpm卸載
rpm查看安裝
rpm -qa | grep -i mysql
rpm 卸載
rpm -e mysql57-community-release-el7-9.noarch rpm -e mysql-community-server-5.7.17-1.el7.x86_64 rpm -e mysql-community-libs-5.7.17-1.el7.x86_64 rpm -e mysql-community-libs-compat-5.7.17-1.el7.x86_64 rpm -e mysql-community-common-5.7.17-1.el7.x86_64 rpm -e mysql-community-client-5.7.17-1.el7.x86_64 cd /var/lib/ rm -rf mysql/
清除餘項
whereis mysql mysql: /usr/bin/mysql /usr/lib64/mysql /usr/local/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
刪除上面的資料夾
rm -rf /usr/bin/mysql
刪除配置
#rm –rf /usr/my.cnf rm -rf /root/.mysql_sercret
剩餘設定檢查
chkconfig --list | grep -i mysqlchkconfig --del mysqld
以上是Centos-mysql卸載的詳細內容。更多資訊請關注PHP中文網其他相關文章!