在linux下開發,mysql數據庫是經常用到的,在linux怎麼安裝卸載mysql數據庫,也許可能比較痛苦,
這裏通過測試實驗處理怎麼卸載msql數據庫問題,先分享。
a)查看系統中是否以rpm包安裝的mysql1. [root@linux ~]# rpm -qa | grep -i mysql
2. 卸載MySQL-client-community-5.0.85-0.rhel4和MySQL-server-community-5.0.85-0.rhel4
1. [root@linux ~]# rpm -e MySQL-client-community-5.0.85-0.rhel4
2. [root@linux ~]# rpm -e MySQL-server-community-5.0.85-0.rhel4
1. [root@linux ~]# chkconfig --list | grep -i mysql
2. mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
刪除mysql服務
1. [root@linux ~]# chkconfig --del mysql
c)刪除分散mysql文件夾
1. [root@linux ~]# whereis mysql
2. mysql: /opt/ mysql
3. mysql:/opt/mysql-5.5.22
分別刪除
1. [root@linux lib]# rm -rf /opt/mysql/
2. [root@linux lib]# rm -rf /opt/mysql-5.5.22
通過以上幾步,mysql應該已經完全卸載乾淨了