Home  >  Article  >  Operation and Maintenance  >  How to delete mysql in centos

How to delete mysql in centos

尚
Original
2020-03-25 17:51:224128browse

How to delete mysql in centos

Completely uninstall mysql:

Uninstall the mysql installation package

yum remove mysql mysql-server mysql-libs compat-mysql51
yum remove mysql-community-release
rpm -e --nodeps mysql-community-libs-5.7.22-1.el7.x86_64
rpm -e –nodeps mysql57-community-release-el7-11.noarch

Delete the remaining mysql directories or files:

Query the mysql installation Directory

whereis mysql
find / -name mysql

Delete the queried directory:

rm -rf /usr/lib64/mysql
rm -rf /usr/share/mysql
rm -rf /usr/bin/mysql
rm -rf /etc/logrotate.d/mysql
rm -rf /var/lib/mysql
rm -rf /var/lib/mysql/mysql

Delete mysql configuration file

rm –rf /usr/my.cnf
rm -rf /root/.mysql_sercret

Recommended tutorial:centos usage tutorial

The above is the detailed content of How to delete mysql in centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn