r# 卸载MysqL
centos系统下,完整卸载MysqL步骤如下:
1. 查找是否安装MysqL
rpm -qa|grep -i MysqL
运行后效果如下
MysqL-community-server-* MysqL-community-common-* MysqL-community-client-* MysqL-community-libs-*
2. 删除MysqL
rpm -e --nodeps MysqL-community-server-* rpm -e --nodeps MysqL-community-common-* rpm -e --nodeps MysqL-community-client-* rpm -e --nodeps MysqL-community-libs-*
3. 删除MysqL老版本的残留文件和数据库
rm -rf /usr/lib/MysqL rm -rf /usr/include/MysqL
注意:卸载后/var/lib/MysqL和/etc/my.cnf不会删除,如果确定没用后就手工删除;
rm -rf /etc/my.cnf
rm -rf /var/lib/MysqL