Detach a MySQL database in Linux
A) Check whether mysql is installed with an rpm package in the system.
[Plain]View plain copy
- [Root @ linux ~] # Rpm-qa | grep-I mysql
- MySQL-server-5.1.49-1.glibc23
- MySQL-client-5.1.49-1.glibc23
Uninstalling A MySQL-server-5.1.49-1.glibc23 and a MySQL-client-5.1.49-1.glibc23 Linux uninstalling a MySQL database
[Plain]View plain copy
- [Root @ linux ~] # Rpm e MySQL-client-5.1.49-1.glibc23
- [Root @ linux ~] # Rpm e MySQL-server-5.1.49-1.glibc23
B) check whether there is any mysql Service
[Plain]View plain copy
- [Root @ linux ~] # 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
- [Root @ linux ~] # Chkconfig -- del mysql
C) delete the scattered mysql folder
[Plain]View plain copy
- [Root @ linux ~] # Whereis mysql
- Mysql:/usr/lib/mysql/usr/share/mysql
Delete separately
[Plain]View plain copy
- [Root @ linux lib] # rm-rf/usr/lib/mysql/
- [Root @ linux lib] # rm-rf/usr/share/mysql
-