root@g0:~# apt-get remove mysql-*
root@g0:~# dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
跳出對話框時(shí)候称簿,選擇yes即可
重新安裝mysql
root@g0:~# apt-get install mysql-client mysql-server
root@g0:~# apt-get update && apt-get upgrade
update
update 是同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,這樣才能獲取到最新的軟件包授药。
upgrade
upgrade 是升級已安裝的所有軟件包垂涯,升級之后的版本就是本地索引里的耕赘,因此操骡,在執(zhí)行 upgrade 之前一定要執(zhí)行 update, 這樣才能是最新的。