加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

Mysql学习在Ubuntu或Debian系统的服务器上卸载MySQL的方法

发布时间:2020-12-12 03:12:32 所属栏目:MySql教程 来源:网络整理
导读:《Mysql学习在Ubuntu或Debian系统的服务器上卸载MySQL的方法》要点: 本文介绍了Mysql学习在Ubuntu或Debian系统的服务器上卸载MySQL的方法,希望对您有用。如果有疑问,可以联系我们。 对于有的vps,系统默认安装了mysql.我们需要从我们的服务器、vps上卸载(

《Mysql学习在Ubuntu或Debian系统的服务器上卸载MySQL的方法》要点:
本文介绍了Mysql学习在Ubuntu或Debian系统的服务器上卸载MySQL的方法,希望对您有用。如果有疑问,可以联系我们。

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

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

  • 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数据库命令文件)

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

sudo apt-get --purge remove mysql-client mysql-server mysql-common
sudo apt-get autoremove

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

remove 表示卸载软件包MYSQL应用

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

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

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 目录,使用如下命令:
MYSQL应用

sudo rm -rf /etc/mysql/  

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读