1. First close or kill the MySQL process
2. Check if the system has MySQL installed in RPM package
1) [[email protected] local]# Rpm-qa | Grep-i MySQL
2) if available, remove the package with the RPM-E command
3. Check if there is a MySQL service
1) [[email protected] local]# Chkconfig--list | Grep-i MySQL
2) if available, delete MySQL service
[[email protected] local]# chkconfig--del MySQL
4. View MySQL Folder
1) [[email protected] local]# Whereis MySQL
2) Delete the folder with the RM-FR command
5. Delete the configuration file
[Email protected] local]# RM-FR/ETC/MY.CNF
--Delete process
[[email protected] etc]#/etc/init.d/mysql stop
Shutting down MySQL .... [OK]
[Email protected] etc]# Rpm-qa | Grep-i MySQL
Mysql-devel-community-5.1.68-1.rhel5
Mysql-server-community-5.1.68-1.rhel5
Mysql-client-community-5.1.68-1.rhel5
[Email protected] etc]# rpm-e Mysql-devel-community-5.1.68-1.rhel5
[Email protected] etc]# rpm-e Mysql-server-community-5.1.68-1.rhel5
[Email protected] etc]# rpm-e Mysql-client-community-5.1.68-1.rhel5
[Email protected] etc]# Chkconfig--list | Grep-i MySQL
[Email protected] etc]#
[[email protected] etc]# Whereis MySQL
MySQL:/usr/lib/mysql
[Email protected] etc]# Rm-fr/usr/lib/mysql
[Email protected] local]# RM-FR/ETC/MY.CNF
Uninstall MySQL under Linux