在Ubuntu或Debian系统的服务器上卸载MySQL的方法
作者:goldensun 时间:2024-01-25 17:24:55
对于有的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 表示强制删除
标签:Linux,MySQL
0
投稿
猜你喜欢
百度编辑器二次开发常用手记整理小结
2023-10-22 20:28:33
ASP实现最简洁的多重查询的解决方案
2007-09-28 12:00:00
SQLServer 2008中通过DBCC OPENTRAN和会话查询事务
2024-01-13 15:35:55
解决jupyter notebook import error但是命令提示符import正常的问题
2022-08-19 22:10:30
OpenCV Python实现拼图小游戏
2021-07-30 18:10:34
ASP3.0中的流控制能力
2008-10-19 17:41:00
Python实现同时兼容老版和新版Socket协议的一个简单WebSocket服务器
2023-05-21 10:05:28
pandas 像SQL一样使用WHERE IN查询条件说明
2023-07-01 23:26:37
python处理xml文件操作详解
2021-11-10 10:31:24
详解TensorFlow训练网络两种方式
2021-06-24 00:18:23
url传递中文的解决方案
2007-10-09 20:17:00
Python脚本操作Excel实现批量替换功能
2023-06-15 16:37:57
Python网页正文转换语音文件的操作方法
2021-03-26 04:27:30
select @@identity的应用(得到刚插入数据的ID)
2009-09-10 11:24:00
python如何查看安装了的模块
2022-07-09 18:28:00
python numpy.linalg.norm函数的使用及说明
2022-05-27 10:20:32
python制作简单计算器功能
2022-08-06 20:57:16
解析SQL Server数据体系和应用程序逻辑
2009-01-23 13:58:00
Tornado Web服务器多进程启动的2个方法
2022-01-21 04:41:05
javascript设计模式 – 单例模式原理与应用实例分析
2024-04-29 14:09:29