標籤:linux mysql 卸載
linux 怎麼完全卸載mysql資料庫
在linux下開發,mysql資料庫是經常用到的,對於初學者來說,在linux怎麼安裝卸載mysql資料庫,也許可能比較痛苦,這裡簡單介紹下,怎麼卸載msql資料庫。
a)查看系統中是否以rpm包安裝的mysql
[plain] view plaincopyprint?
[[email protected] ~]# 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
[plain] view plaincopyprint?
[[email protected] ~]# rpm -e MySQL-client-5.1.49-1.glibc23
[[email protected] ~]# rpm -e MySQL-server-5.1.49-1.glibc23
b)查看有沒有mysql服務
[plain] view plaincopyprint?
[[email protected] ~]# chkconfig --list | grep -i mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
刪除mysql服務
[plain] view plaincopyprint?
[[email protected] ~]# chkconfig --del mysql
c)刪除分散mysql檔案夾
[plain] view plaincopyprint?
[[email protected] ~]# whereis mysql
mysql: /usr/lib/mysql /usr/share/mysql
分別刪除
[plain] view plaincopyprint?
[[email protected] lib]# rm -rf /usr/lib/mysql/
[[email protected] lib]# rm -rf /usr/share/mysql
通過以上幾步,mysql應該已經完全卸載乾淨了