在Ubuntu或Debian系统的服务器上卸载MySQL的方法
作者:goldensun 发布时间:2024-01-25 17:24:55
标签:Linux,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 :
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 表示强制删除


猜你喜欢
- <%'============================================================
- PDO::quotePDO::quote — 为SQL语句中的字符串添加引号。(PHP 5 >= 5.1.0, PECL pdo &g
- python调用mysql数据库通常通过mysqldb模块,简单说下如何调用1.安装驱动目前有两个MySQL的驱动,我们可以选择其中一个进行
- 1)正则表达式的使用。 #正则表达式的模块 import re #正则表达式 rePattern = '.*[0-9]{4}'
- 因为mounted函数只会在html和模板渲染之后会加载一次,但是在子组件中只有第一次的数据显示是正常的,所以需要再增加一个updated函
- 前言无聊的时候做了一个搜索文章的软件,有没有更加的方便快捷不知道,好玩就行了环境使用Python 3.8Pycharm模块使用import
- 1.执行时间 window.onl
- 对dataframe绘图并保存:ax = df.plot() fig = ax.get_figure()fig.savefig('f
- 最近为了做Hyperledger Fabric国密改造,涉及到了golang源码的改动。特将操作过程整理如下,以供参考:golang的源码安
- 我们在编写 JS 代码时,经常会遇到逻辑判断复杂的情况。一般情况下,可以用 if/else 或 switch 来实现多个条件判断,但会出现一
- 网站可用性是任何网站的基本要素,而可用的导航更是网站所必需的要素之一。导航决定了用户如何与网站进行交互。如果没有了可用的导航,那么网站内容就
- 本文实例讲述了从ThinkPHP3.2.3过渡到ThinkPHP5.0学习笔记。分享给大家供大家参考,具体如下:用tp3.2.3做了不少项目
- 支付宝或者微信支付导出的收款二维码,除了二维码部分,还有很大一块背景图案,例如下面就是微信支付的收款二维码:有时候我们仅仅只想要图片中间的方
- 前言本文介绍的主要内容是 Redux-Toolkit 在 React + TypeScript 大型应用中的实践,主要解决的问题是使用 cr
- 多表查询案列说明笛卡尔积的理解select id,department_namefrom employees,departments;#错的
- 以下就是php动态生成函数示例,示例中用到了eval函数,我感觉如果服务器上允许用户运行这样的函数是非常危险的<?$a['a&
- omitempty在go中的使用直接上代码:package mainimport ( "encoding/json&q
- 说来惭愧,以前在去掉数组的空值是都是强写foreach或者while的,利用这两个语法结构来删除数组中的空元素,简单代码如下:<?ph
- 根据微软论坛作者的英文解释,.NET framework 4.0 安装失败回滚貌似是因为“msvcr100_clr0400.d
- 不管是啥语言都离不开加减乘除这些算法,但是在Python里面你知道这些符号代表什么运算吗?“/”这个是除法运算,那么这个“//”呢?“*”这