Linux how to completely uninstall MySQL database
Under the Linux development, MySQL database is often used, for beginners, in Linux How to load MySQL database, may be more painful, here is a brief introduction, how to uninstall mSQL database.
A) Check the system for MySQL installed in RPM package
[Plain] View Plain Copy Print ?
[Email protected] ~]# Rpm-qa | Grep-i MySQL
Mysql-server-5.1.49-1.glibc23
Mysql-client-5.1.49-1.glibc23
Uninstalling Mysql-server-5.1.49-1.glibc23 and Mysql-client-5.1.49-1.glibc23
[Plain] View Plain Copy Print ?
[Email protected] ~]# rpm-e mysql-client-5.1.49-1.glibc23
[Email protected] ~]# rpm-e mysql-server-5.1.49-1.glibc23
b) See if there is a MySQL service
[Plain] View Plain Copy Print ?
[Email protected] ~]# Chkconfig--list | Grep-i MySQL
MySQL 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Delete MySQL Service
[Plain] View Plain Copy Print ?
[[email protected] ~]# chkconfig--del MySQL
c) Delete the distributed MySQL folder
[Plain] View Plain Copy Print ?
[[email protected] ~]# Whereis MySQL
MySQL:/usr/lib/mysql/usr/share/mysql
Delete separately
[Plain] View Plain Copy Print ?
[Email protected] lib]# rm-rf/usr/lib/mysql/
[Email protected] lib]# Rm-rf/usr/share/mysql
With these steps, MySQL should have been completely uninstalled.