当前位置:网站首页>Linux系统彻底删除Mysql
Linux系统彻底删除Mysql
2022-07-27 23:51:00 【归~海】
这是我之前安装的mysql5.7,然后想换成mysql8.0就有这篇,差不多跟着操作应该可以删除干净。

一、你要先查询你是否安装了mysql(我的linux是centos7的)
rpm -qa | grep -i mysql
二、关闭mysql相关的服务
1、先查询一下你的mysql服务是否运行着(我的mysqld是因为我用rpm命令安装的)
systemctl status mysqld
2、关闭mysql服务
systemctl stop mysqld
3、可以再次确认是否关闭服务
systemctl status mysqld
三、开始卸载mysql
1、查找出mysql对应的目录
find / -name mysql
2、删除对应的mysql目录
根据你上面查出来的命令来删除

一个小要点:卸载后/etc/my.cnf不会删除,需要进行手工删除
rm -rf /etc/my.cnf
四、卸载并删除MySQL安装的组件服务
rpm -qa|grep -i mysql删除你找出来的mysql组件服务

五、卸载完成后检查是否卸载成功
rpm -qa | grep -i mysql 或者
systemctl start mysql
如果什么都没有恭喜你卸载好了。

边栏推荐
猜你喜欢
随机推荐
3000 words and 11 pictures hard core popular science: what is edge computing? What are the connections and differences with cloud computing?
Article reproduction: super resolution network fsrcnn
Codeforces summer training weekly (7.21~7.27)
JG data reset (WD)
Storage practices for high-performance computing scenarios, see here
Interview question 01.06. string compression
阿虎的故事
How to calculate the profit and loss of spot Silver
Interpretation of new features | the restriction of MySQL 8.0 on gtid is lifted
HRD 1. 一个简单而靠谱的HRD的检测方法
Interview question 01.05. Primary editing
C language · pointer
我的富二代朋友
Introduction to routing strategy
8000 word explanation of OBSA principle and application practice
26. Abstraction and template ideas
Briefly understand namenode and datanode
qt 设置图标
Opengauss active / standby architecture works with keeplive
【分布式开发】之 CAP 原则










