Home>Article>Database> How to delete mysql in centos

How to delete mysql in centos

青灯夜游
青灯夜游 Original
2021-12-31 17:32:53 13681browse

How to delete mysql in centos: 1. Use the "rpm -qa|grep -i mysql" command to view the services installed by mysql; 2. Use the "rpm -ev --nodeps service name" command to query the Just delete all mysql services.

How to delete mysql in centos

The operating environment of this tutorial: CentOS7 system, mysql8 version, Dell G3 computer.

centos7 steps to delete mysql

Method 1,

1. View Which mysql services are installed

rpm -qa|grep -i mysql

2, and then uninstall them one by one

Close the mysql service before uninstalling

rpm -ev --nodeps mysql-community-release-el7-5.noarch rpm -ev --nodeps mysql-community-common-5.6.38-2.el7.x86_64 rpm -ev --nodeps mysql-community-client-5.6.38-2.el7.x86_64 rpm -ev --nodeps mysql-community-libs-5.6.38-2.el7.x86_64 rpm -ev --nodeps community-server-5.6.38-2.el7.x86_64

Complete execution After executing the commandrpm-qa|grep -i mysqlagain, you will find that the uninstallation has been completed.

Method 2,

Execute the command

find / -name mysql

Change the found directory Delete

rm -rf 上面查出的文件夹

etc/my.cnfIf it exists, delete it manually, so that mysql will be uninstalled.

Note: The mysql found by the second method is not necessarily the MySQL installation service, it may be another file name. Pay attention to the distinction when deleting

[Related recommendations:mysql video 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