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.
The operating environment of this tutorial: CentOS7 system, mysql8 version, Dell G3 computer.
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 mysql
again, 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.cnf
If 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!