日期:2014-05-16  浏览次数:20561 次

linux怎么完全卸载mysql数据库

??? 原文:http://blog.csdn.net/love__coder/article/details/6894566

??? 在linux下开发,mysql数据库是经常用到的,对于初学者来说,在linux怎么安装卸载mysql数据库,也许可能比较痛苦,这里简单介绍下,怎么卸载msql数据库。

a)查看系统中是否以rpm包安装的mysql

[plain] view plaincopyprint?
  1. [root@linux?~]#?rpm?-qa?|?grep?-i?mysql??
  2. MySQL-server-5.1.49-1.glibc23??
  3. MySQL-client-5.1.49-1.glibc23??
[root@linux ~]# rpm -qa | grep -i mysql
MySQL-server-5.1.49-1.glibc23
MySQL-client-5.1.49-1.glibc23

卸载MySQL-server-5.1.49-1.glibc23和MySQL-client-5.1.49-1.glibc23

[plain] view plaincopyprint?
  1. [root@linux?~]#?rpm?-e?MySQL-client-5.1.49-1.glibc23??
  2. [root@linux?~]#?rpm?-e?MySQL-server-5.1.49-1.glibc23??
[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23
[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23

b)查看有没有mysql服务

?

[plain] view plaincopyprint?
  1. [root@linux?~]#?chkconfig?--list?|?grep?-i?mysql??
  2. mysql???????????0:off???1:off???2:on????3:on????4:on????5:on????6:off??
[root@linux ~]# chkconfig --list | grep -i mysql
mysql           0:off   1:off   2:on    3:on    4:on    5:on    6:off

删除mysql服务

[plain] view plaincopyprint?
  1. [root@linux?~]#?chkconfig?--del?mysql??
[root@linux ~]# chkconfig --del mysql

c)删除分散mysql文件夹

[plain] view plaincopyprint