Centos8卸载MySQL5.7
2020-04-16 16:13:19
1816次阅读
0个评论
1. 卸载MySQL
卸载Centos8上的MySQL的全部 资源,(此方法同样适用于想卸载MySQL的)
1.1 yum方式查询是否安装了MySQL
如果出现:
Dependencies resolved.
===============================================================================================================================================================================================
Package Architecture Version Repository Size
===============================================================================================================================================================================================
Installing:
mysql-community-server x86_64 5.7.29-1.el7 mysql57-community 175 M
Installing dependencies:
mysql-community-client x86_64 5.7.29-1.el7 mysql57-community 26 M
mysql-community-common x86_64 5.7.29-1.el7 mysql57-community 311 k
mysql-community-libs x86_64 5.7.29-1.el7 mysql57-community 2.5 M
Transaction Summary
说明有,需要卸载。
1.2 yum方式卸载(如果有,则执行这一步)
1.3 rpm查看是否安装mysql
如果出现
mysql-community-client-5.7.27-1.el6.x86_64
mysql-community-common-5.7.29-1.el7.x86_64
mysql-community-server-5.7.29-1.el7.x86_64
mysql-community-libs-5.7.27-1.el6.x86_64
则说明存在
1.4 rpm卸载MySQL
1.5 清除剩余资源文件:
出现:mysql: /usr/bin/mysql /usr/lib64/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
删除:rm -rf "上面的资源文件(如:/usr/bin/mysql)"
1.6 删除MySQL残留的配置文件
1.7 再次检查是否完全删除
如果还有资源没有删除干净,重复以上方法
卸载Centos8上的MySQL的全部 资源,(此方法同样适用于想卸载MySQL的)
1.1 yum方式查询是否安装了MySQL
yum list installed mysql*
如果出现:
Dependencies resolved.
===============================================================================================================================================================================================
Package Architecture Version Repository Size
===============================================================================================================================================================================================
Installing:
mysql-community-server x86_64 5.7.29-1.el7 mysql57-community 175 M
Installing dependencies:
mysql-community-client x86_64 5.7.29-1.el7 mysql57-community 26 M
mysql-community-common x86_64 5.7.29-1.el7 mysql57-community 311 k
mysql-community-libs x86_64 5.7.29-1.el7 mysql57-community 2.5 M
Transaction Summary
说明有,需要卸载。
1.2 yum方式卸载(如果有,则执行这一步)
yum remove mysql-community-server mysql-community-client mysql-community-common mysql-community-libs
rm -rf /var/lib/mysql
rm /etc/my.cnf
1.3 rpm查看是否安装mysql
rpm -qa | grep -i mysql
如果出现
mysql-community-client-5.7.27-1.el6.x86_64
mysql-community-common-5.7.29-1.el7.x86_64
mysql-community-server-5.7.29-1.el7.x86_64
mysql-community-libs-5.7.27-1.el6.x86_64
则说明存在
1.4 rpm卸载MySQL
rpm -e mysql-community-client-5.7.27-1.el6.x86_64
rpm -e mysql-community-common-5.7.29-1.el7.x86_64
rpm -emysql-community-server-5.7.29-1.el7.x86_64
rpm -e mysql-community-libs-5.7.27-1.el6.x86_64
cd /var/lib/
rm -rf mysql/
1.5 清除剩余资源文件:
whereis mysql
出现:mysql: /usr/bin/mysql /usr/lib64/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
删除:rm -rf "上面的资源文件(如:/usr/bin/mysql)"
1.6 删除MySQL残留的配置文件
rm –rf /usr/my.cnf
rm -rf /root/.mysql_sercret
1.7 再次检查是否完全删除
chkconfig --list | grep -i mysql
chkconfig --del mysqld
如果还有资源没有删除干净,重复以上方法
00
- 0回答
- 1粉丝
- 0关注
相关话题
- Centos8安装MySQL5.7
- CentOS8 安装 MySQL8.0(yum)
- MySQL5.7 分组排序
- Centos8下mysql 8.0忘记密码后重置密码
- MySQL5.7多主一从(多源复制)同步配置
- MySQL 5.7及之前版本SQL语句
- MYSQL 5.7查看分区表相关语句
- CentOS 8.x系统停止维护yum无法使用解决方法
- 卸载PM2方法
- 阿里云CentOS 8.x系统yum报404的解决方法(Errors during downloading metadata for repository 'appstream':
- CentOS设置时间和时区
- Centos7关闭kdump
- CentOS8.0安装OpenJDK 16
- MySQL 命令大全
- MySQL签到设计