centos 7.x 彻底卸载删除MySQL
停止MySQL服务:
systemctl stop mysqld.service
查看所安装的MySQL:
yum list installed | grep mysql
如上图,我们需要将上面的安装文件全部卸载,命令如下:
yum remove mysql-community-client mysql-community-common mysql-community-server mysql-community-libs mysql-community-libs-compat
查找其它MySQL的残留文件,并全部删除:
whereis mysql
或者:
find / -name mysql
#find命令全盘扫描
删除:
示例命令:
rm -rf /var/lib/mysql