您的位置:首页 > 运维架构 > Linux

linux rpm方式完全卸载mysql

2016-09-07 23:03 337 查看
转自:http://www.phpddt.com/db/linux-rpm-mysql-remove.html

因为要升级Mysql版本,在linux rpm完全卸载mysql过程如下:

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

转载请注明地址: http://www.phpddt.com/db/linux-rpm-mysql-remove.html 尊重他人劳动成果就是尊重自己!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: