前言php
今天搞線下服務器災備測試的時候,用shell操做數據庫,不當心將mysql自帶的幾個庫給drop掉了,無奈想重裝mysql,靠它本身恢復了,哈哈,windows用戶遺留下來的思想做怪啊,記錄一下我在Ubuntu下完全刪除mysql的操做mysql
刪除mysqllinux
1.sudo apt-get autoremove --purge mysql-server-5.5sql
2.sudo apt-get remove mysql-commonshell
清理殘留數據數據庫
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P windows
從新安裝mysql服務器
1.sudo apt-get install mysql-server測試
2.sudo apt-get install mysql-clientspa
3.sudo apt-get install php5-mysql
更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2
![linux](http://static.javashuo.com/static/loading.gif)