CentOS上装了Mysql如何清除干净?
导读:这篇文章主要为大家详细介绍了CentOS上装了Mysql如何清除干净?的内容,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,希望对大家学习或工作能有帮助,接下来就跟随小编一起来学习吧。 ###############...
这篇文章主要为大家详细介绍了CentOS上装了Mysql如何清除干净?的内容,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,希望对大家学习或工作能有帮助,接下来就跟随小编一起来学习吧。#################CentOS7下MySQL的卸载####################
1:查看MySQL是否安装:
方式1:
[plain]view plain copy- [root@localhostusr]#yumlistinstalledmysql*
- Loadedplugins:fastestmirror
- Loadingmirrorspeedsfromcachedhostfile
- *base:mirrors.yun-idc.com
- *extras:mirror.neu.edu.cn
- *updates:mirrors.yun-idc.com
- InstalledPackages
- MySQL-client.x86_645.6.27-1.el6installed
- MySQL-devel.x86_645.6.27-1.el6installed
- MySQL-server.x86_645.6.27-1.el6installed
- [root@localhostusr]#
方式2(-i :不区分大小写):
[plain]view plain copy- [root@localhostusr]#rpm-qa|grep-imysql
- 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@localhostusr]#
2:卸载MySQL:
卸载1:
[plain]view plain copy- [root@localhostusr]#yumremovemysqlmysql-servermysql-libscompat-mysql51
- [root@localhostusr]#rm-rf/var/lib/mysql
- [root@localhostusr]#rm/etc/my.cnf
如果装了mysql-devel(其他一样add command),卸载为:
[plain]view plain copy- [root@Tony_ts_tianinit.d]#yumremovemysqlmysql-develmysql-servermysql-libscompat-mysql51
注(例如):
mysql-5.5.39-1.el6.remi.x86_64mysql-libs-5.5.39-1.el6.remi.x86_64 compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-server-5.5.39-1.el6.remi.x86_64 卸载2{ 继续,1,2选择一种(此处为介绍):} : [plain]view plain copy
- [root@localhostmysql]#rpm-aq|grep-imysql
- 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@localhostmysql]#rpm-eMySQL-server-5.6.27-1.el6.x86_64
- [root@localhostmysql]#rpm-eMySQL-client-5.6.27-1.el6.x86_64
- [root@localhostmysql]#rpm-eMySQL-devel-5.6.27-1.el6.x86_64
- [root@localhostrc.d]#cd/var/lib/
- [root@localhostlib]#rm-rfmysql/
- [root@localhostusr]#whereismysql
- mysql:/usr/lib64/mysql
- [root@localhostusr]#rm-rf/usr/lib64/mysql
rm -rf /usr/share/mysql
卸载4: [plain]view plain copy
- [root@localhostusr]#rm–rf/usr/my.cnf
- [root@localhostusr]#rm-rf/root/.mysql_sercret
- [root@localhostusr]#chkconfig--list|grep-imysql
- [root@localhostusr]#chkconfig--delmysqld
- 此处删除看自己设置:mysql/mysqld
到此这篇关于“CentOS上装了Mysql如何清除干净?”的文章就介绍到这了,感谢各位的阅读,更多相关CentOS上装了Mysql如何清除干净?内容,欢迎关注网络资讯频道,小编将为大家输出更多高质量的实用文章!
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: CentOS上装了Mysql如何清除干净?
本文地址: https://pptw.com/jishu/649445.html