为了账号安全,请及时绑定邮箱和手机立即绑定

Linux——CentOS7之彻底删除mysql

标签:
MySQL Linux

最近在倒哧mysql,然后结果是倒哧坏了。咋办?卸载吧~

卸载过程很简单,只需要以下几条命令

yum remove  mysql mysql-server mysql-libs mysql-server;

当然是删不干净的

然后我们需要查找跟mysql有关的文件全删了

 find / -name mysql

然后用yum remove命令删除查到的相关程序

 rpm -qa|grep mysql

过程如下

[root@VM_183_120_centos log]#   yum remove  mysql mysql-server mysql-libs mysql-server;
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.18-1.el7 will be erased
---> Package mysql-community-libs.x86_64 0:5.7.18-1.el7 will be erased
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-libs-compat-5.7.18-1.el7.x86_64
---> Package mysql-community-server.x86_64 0:5.7.18-1.el7 will be erased
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.7.18-1.el7 will be erased
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
--> Running transaction check
---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                                     Arch                   Version                          Repository                          Size
==============================================================================================================================================
Removing:
 mysql-community-client                      x86_64                 5.7.18-1.el7                     @mysql57-community                 106 M
 mysql-community-libs                        x86_64                 5.7.18-1.el7                     @mysql57-community                 9.4 M
 mysql-community-server                      x86_64                 5.7.18-1.el7                     @mysql57-community                 730 M
Removing for dependencies:
 mysql-community-libs-compat                 x86_64                 5.7.18-1.el7                     @mysql57-community                 9.1 M
 postfix                                     x86_64                 2:2.10.1-6.el7                   @anaconda                           12 M

Transaction Summary
==============================================================================================================================================
Remove  3 Packages (+2 Dependent packages)

Installed size: 867 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : mysql-community-server-5.7.18-1.el7.x86_64                                                                                 1/5 
  Erasing    : mysql-community-client-5.7.18-1.el7.x86_64                                                                                 2/5 
  Erasing    : 2:postfix-2.10.1-6.el7.x86_64                                                                                              3/5 
  Erasing    : mysql-community-libs-compat-5.7.18-1.el7.x86_64                                                                            4/5 
  Erasing    : mysql-community-libs-5.7.18-1.el7.x86_64                                                                                   5/5 
  Verifying  : 2:postfix-2.10.1-6.el7.x86_64                                                                                              1/5 
  Verifying  : mysql-community-server-5.7.18-1.el7.x86_64                                                                                 2/5 
  Verifying  : mysql-community-libs-5.7.18-1.el7.x86_64                                                                                   3/5 
  Verifying  : mysql-community-client-5.7.18-1.el7.x86_64                                                                                 4/5 
  Verifying  : mysql-community-libs-compat-5.7.18-1.el7.x86_64                                                                            5/5 

Removed:
  mysql-community-client.x86_64 0:5.7.18-1.el7   mysql-community-libs.x86_64 0:5.7.18-1.el7   mysql-community-server.x86_64 0:5.7.18-1.el7  

Dependency Removed:
  mysql-community-libs-compat.x86_64 0:5.7.18-1.el7                               postfix.x86_64 2:2.10.1-6.el7                              

Complete!
[root@VM_183_120_centos log]#  find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/share/mysql
[root@VM_183_120_centos log]# rm -rf /var/lib/mysql
[root@VM_183_120_centos log]# rm -rf /usr/share/mysql 
[root@VM_183_120_centos log]#  find / -name mysql
[root@VM_183_120_centos log]#  rpm -qa|grep mysql
mysql57-community-release-el7-8.noarch
mysql-community-common-5.7.18-1.el7.x86_64
[root@VM_183_120_centos log]# yum remove mysql57-community-release.noarch 
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package mysql57-community-release.noarch 0:el7-8 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                                Arch                Version               Repository                                             Size
==============================================================================================================================================
Removing:
 mysql57-community-release              noarch              el7-8                 @/mysql57-community-release-el7-8.noarch              8.2 k

Transaction Summary
==============================================================================================================================================
Remove  1 Package

Installed size: 8.2 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : mysql57-community-release-el7-8.noarch                                                                                     1/1 
  Verifying  : mysql57-community-release-el7-8.noarch                                                                                     1/1 

Removed:
  mysql57-community-release.noarch 0:el7-8                                                                                                    

Complete!
[root@VM_183_120_centos log]#  rpm -qa|grep mysql
mysql-community-common-5.7.18-1.el7.x86_64
[root@VM_183_120_centos log]# yum remove mysql-community-common.x86_64 
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-common.x86_64 0:5.7.18-1.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                                  Arch                     Version                         Repository                            Size
==============================================================================================================================================
Removing:
 mysql-community-common                   x86_64                   5.7.18-1.el7                    @mysql57-community                   2.5 M

Transaction Summary
==============================================================================================================================================
Remove  1 Package

Installed size: 2.5 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : mysql-community-common-5.7.18-1.el7.x86_64                                                                                 1/1 
warning: file /usr/share/mysql/ukrainian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/ukrainian: remove failed: No such file or directory
warning: file /usr/share/mysql/swedish/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/swedish: remove failed: No such file or directory
warning: file /usr/share/mysql/spanish/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/spanish: remove failed: No such file or directory
warning: file /usr/share/mysql/slovak/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/slovak: remove failed: No such file or directory
warning: file /usr/share/mysql/serbian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/serbian: remove failed: No such file or directory
warning: file /usr/share/mysql/russian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/russian: remove failed: No such file or directory
warning: file /usr/share/mysql/romanian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/romanian: remove failed: No such file or directory
warning: file /usr/share/mysql/portuguese/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/portuguese: remove failed: No such file or directory
warning: file /usr/share/mysql/polish/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/polish: remove failed: No such file or directory
warning: file /usr/share/mysql/norwegian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/norwegian-ny/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/norwegian-ny: remove failed: No such file or directory
warning: file /usr/share/mysql/norwegian: remove failed: No such file or directory
warning: file /usr/share/mysql/korean/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/korean: remove failed: No such file or directory
warning: file /usr/share/mysql/japanese/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/japanese: remove failed: No such file or directory
warning: file /usr/share/mysql/italian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/italian: remove failed: No such file or directory
warning: file /usr/share/mysql/hungarian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/hungarian: remove failed: No such file or directory
warning: file /usr/share/mysql/greek/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/greek: remove failed: No such file or directory
warning: file /usr/share/mysql/german/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/german: remove failed: No such file or directory
warning: file /usr/share/mysql/french/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/french: remove failed: No such file or directory
warning: file /usr/share/mysql/estonian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/estonian: remove failed: No such file or directory
warning: file /usr/share/mysql/errmsg-utf8.txt: remove failed: No such file or directory
warning: file /usr/share/mysql/english/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/english: remove failed: No such file or directory
warning: file /usr/share/mysql/dutch/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/dutch: remove failed: No such file or directory
warning: file /usr/share/mysql/danish/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/danish: remove failed: No such file or directory
warning: file /usr/share/mysql/czech/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/czech: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/swe7.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/macroman.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/macce.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/latin7.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/latin5.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/latin2.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/latin1.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/koi8u.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/koi8r.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/keybcs2.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/hp8.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/hebrew.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/greek.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/geostd8.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/dec8.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/cp866.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/cp852.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/cp850.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/cp1257.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/cp1256.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/cp1251.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/cp1250.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/ascii.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/armscii8.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/README: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets/Index.xml: remove failed: No such file or directory
warning: file /usr/share/mysql/charsets: remove failed: No such file or directory
warning: file /usr/share/mysql/bulgarian/errmsg.sys: remove failed: No such file or directory
warning: file /usr/share/mysql/bulgarian: remove failed: No such file or directory
  Verifying  : mysql-community-common-5.7.18-1.el7.x86_64                                                                                 1/1 

Removed:
  mysql-community-common.x86_64 0:5.7.18-1.el7                                                                                                

Complete!
点击查看更多内容
1人点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消