在Ubuntu或Debian系統(tǒng)的服務(wù)器上卸載MySQL的方法
對于有的vps,系統(tǒng)默認(rèn)安裝了mysql。我們需要從我們的服務(wù)器、vps上卸載(移除)默認(rèn)的mysql。那么如何(怎樣)在ubuntu\Debian上卸載mysql?
通常情況下,下列mysql軟件包會被安裝到 Debian 、Ubuntu中:
- mysql-client - The latest version of MySQL database client(最新版的mysql數(shù)據(jù)庫客戶端).
- mysql-server - The latest version of MySQL database server.(最新版的mysql數(shù)據(jù)庫服務(wù)端)
- mysql-common - MySQL database common files(mysql數(shù)據(jù)庫命令文件)
那么如何怎樣在ubuntu\Debian上卸載mysql?
只需要使用 apt-get 命令 即可,如下面的命令,同時卸載 ubuntu \ Debian 中的 mysql server 和 mysql client :
sudo apt-get --purge remove mysql-client mysql-server mysql-common sudo apt-get autoremove
解釋: --purge 移除所給的軟件包和配置文件
remove 表示卸載軟件包
autoremove 表示自動卸載軟件包,以及與該軟件包的依賴(軟件包)
輸入如下(注意軟件包名字):
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-3.2.0-31-virtual linux-headers-3.2.0-31 Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: libdbd-mysql-perl* libmysqlclient18* mysql-client* mysql-client-5.5* mysql-common* mysql-server* mysql-server-5.5* 0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded. After this operation, 67.5 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 105097 files and directories currently installed.) Removing mysql-server ... Removing mysql-server-5.5 ... mysql stop/waiting Purging configuration files for mysql-server-5.5 ... Removing mysql-client ... Removing mysql-client-5.5 ... Removing libdbd-mysql-perl ... Removing libmysqlclient18 ... Purging configuration files for libmysqlclient18 ... Removing mysql-common ... Purging configuration files for mysql-common ... dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed. Processing triggers for ureadahead ... Processing triggers for man-db ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place
刪除 /etc/mysql 目錄,使用如下命令:
sudo rm -rf /etc/mysql/
解釋:-r 同時刪除該目錄下的所有子目錄。 -f 表示強(qiáng)制刪除
相關(guān)文章
MySQL的LEFT JOIN表連接的進(jìn)階學(xué)習(xí)教程
這篇文章主要介紹了MySQL的LEFT JOIN表連接的進(jìn)階學(xué)習(xí)教程,包括對左連接的查詢效率分析以及相關(guān)建議,需要的朋友可以參考下2015-12-12
mysql給id設(shè)置默認(rèn)值為UUID的實(shí)現(xiàn)方法
由于mysql并不支持默認(rèn)值為函數(shù)類型,給id設(shè)值有兩種方式,本文主要介紹了mysql給id設(shè)置默認(rèn)值為UUID的實(shí)現(xiàn)方法,具有一定的參考價(jià)值,感興趣的可以了解一下2023-08-08
window10系統(tǒng)下mysql5.7安裝審計(jì)插件(親測有用)
mysql有沒oracle這樣的審計(jì)功能,突然想在mysql做審計(jì)怎么辦,下面帶大家從零開始給mysql安裝審計(jì)插件,親測絕對可用哦,需要的朋友可以參考下2022-09-09
MySQL錯誤代碼:1052?Column?'xxx'?in?field?list?is
今天在工作中寫sql語句時遇到了個sql錯誤,為記錄并不再重復(fù)出錯,下面這篇文章主要給大家介紹了關(guān)于MySQL錯誤代碼:1052?Column?'xxx'?in?field?list?is?ambiguous的原因和解決方法,需要的朋友可以參考下2023-04-04
MySQL中時區(qū)參數(shù)time_zone解讀
MySQL時區(qū)參數(shù)time_zone用于控制系統(tǒng)函數(shù)和字段的DEFAULT CURRENT_TIMESTAMP屬性,修改時區(qū)可能會影響timestamp類型的值,建議在MySQL配置文件中設(shè)置時區(qū)參數(shù),以確保高并發(fā)時的性能,在業(yè)務(wù)中盡量使用datetime類型來存儲時間,因?yàn)槠鋾r間上限比TIMESTAMP更遠(yuǎn)2025-01-01
MySQL SELECT?...for?update的具體使用
本文主要介紹了MySQL的SELECT?...for?update的具體使用,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-05-05

