Mysql-CentOS7卸载

卸载mysql

命令:

1
2
3
[root@localhost usr]# yum remove mysql mysql-server mysql-libs compat-mysql51
[root@localhost usr]# rm -rf /var/lib/mysql
[root@localhost usr]# rm /etc/my.cnf

查看安装的rpm包:

1
2
3
4
5
6
7
8
9
[root@localhost mysql]# rpm -aq | grep -i mysql
MySQL-server-5.6.27-1.el6.x86_64
MySQL-client-5.6.27-1.el6.x86_64
MySQL-devel-5.6.27-1.el6.x86_64
[root@localhost mysql]# rpm -e MySQL-server-5.6.27-1.el6.x86_64
[root@localhost mysql]# rpm -e MySQL-client-5.6.27-1.el6.x86_64
[root@localhost mysql]# rpm -e MySQL-devel-5.6.27-1.el6.x86_64
[root@localhost rc.d]# cd /var/lib/
[root@localhost lib]# rm -rf mysql/
1
2
3
4
5
[root@localhost usr]# whereis mysql
mysql: /usr/lib64/mysql
[root@localhost usr]# rm -rf /usr/lib64/mysql

find / -name mysql

卸载自启服务:

1
2
[root@localhost usr]# chkconfig --list | grep -i mysql
[root@localhost usr]# chkconfig --del mysqld

参考:

http://blog.csdn.net/typa01_kk/article/details/49057073