亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

在Ubuntu或Debian系統的服務器上卸載MySQL的方法

標簽:
MySQL

对于有的vps,系统默认安装了mysql。我们需要从我们的服务器、vps上卸载(移除)默认的mysql。那么如何(怎样)在ubuntu\Debian上卸载mysql?

通常情况下,下列mysql软件包会被安装到 Debian 、Ubuntu中:

  • mysql-client - The latest version of MySQL database client(最新版的mysql数据库客户端).

  • mysql-server - The latest version of MySQL database server.(最新版的mysql数据库服务端)

  • mysql-common - MySQL database common files(mysql数据库命令文件)

那么如何怎样在ubuntu\Debian上卸载mysql?
只需要使用 apt-get 命令 即可,如下面的命令,同时卸载 ubuntu \ Debian 中的 mysql server 和 mysql client :

?

12sudo apt-get --purge remove mysql-client mysql-server mysql-commonsudo apt-get autoremove

解释: --purge 移除所给的软件包和配置文件

remove 表示卸载软件包

autoremove 表示自动卸载软件包,以及与该软件包的依赖(软件包)

输入如下(注意软件包名字):

?


Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required: linux-headers-3.2.0-31-virtual linux-headers-3.2.0-31Use '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/waitingPurging 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 目录,使用如下命令:

?

1sudo rm -rf /etc/mysql/ 

解释:-r 同时删除该目录下的所有子目录。 -f 表示强制删除

點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
移動開發工程師
手記
粉絲
18
獲贊與收藏
136

關注作者,訂閱最新文章

閱讀免費教程

  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消