linux rpm方式完全卸载mysql

来源:互联网 发布:php 个性化推荐系统 编辑:程序博客网 时间:2024/04/29 21:58

1.查找安装的mysql:

[root@host ~]# rpm -qa | grep mysql

mysql-server-5.0.95-1.el5_7.1
mysql-5.0.95-1.el5_7.1
mysql-5.0.95-1.el5_7.1

2.直接删除它们:

[root@host ~]# rpm -e --nodeps mysql mysql-server
[root@host ~]# rpm -e --allmatches mysql-5.0.95-1.el5_7.1

3.查找mysql服务是否存在,并关掉。

[root@host ~]# chkconfig --del mysql

[root@host ~]# chkconfig --list | grep -i mysql  

4.删除mysql文件夹,删除mysql配置文件:

[root@host ~]# rm -rf /user/local/mysql

[root@host ~]# rm -rf /etc/my.cnf

0 0
原创粉丝点击