Home > Database > Mysql Tutorial > Centos-mysql uninstall

Centos-mysql uninstall

远方*
Release: 2022-03-11 15:14:57
Original
231 people have browsed it

The first way to uninstall: yum uninstall

Check if yum has installed mysql

yum list installed mysql*
Copy after login

yum command to uninstall

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
Copy after login

The second way to uninstall: rpm uninstall
rpmView installation

rpm -qa | grep -i mysql
Copy after login

rpm Uninstall

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/
Copy after login

Clear remaining items

 whereis mysql
  mysql: /usr/bin/mysql /usr/lib64/mysql /usr/local/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
Copy after login

Delete the above folder

rm -rf /usr/bin/mysql
Copy after login

Delete configuration

rm –rf /usr/my.cnf
rm -rf /root/.mysql_sercret
Copy after login

Remaining configuration check

chkconfig --list | grep -i mysqlchkconfig --del mysqld
Copy after login

The above is the detailed content of Centos-mysql uninstall. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template