linux 怎么完全卸載mysql數據庫
a)查看系統中是否以rpm包安裝的mysql
[root@linux ~]# rpm -qa | grep -i mysql
MySQL-server-5.1.49-1.glibc23
MySQL-client-5.1.49-1.glibc23
卸載MySQL-server-5.1.49-1.glibc23和MySQL-client-5.1.49-1.glibc23
[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23
[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23
b)查看有沒有mysql服務
[root@linux ~]# chkconfig --list | grep -i mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
刪除mysql服務
[root@linux ~]# chkconfig --del mysql
c)刪除分散mysql文件夾
[root@linux ~]# whereis mysql
mysql: /usr/lib/mysql /usr/share/mysql
分別刪除
[root@linux lib]# rm -rf /usr/lib/mysql/
[root@linux lib]# rm -rf /usr/share/mysql
posted on 2013-10-08 11:33 順其自然EVO 閱讀(456) 評論(0) 編輯 收藏 所屬分類: linux