linux 怎么完全卸载mysql数据库
2015-07-16 21:30
549 查看
在linux下开发,mysql数据库是经常用到的,对于初学者来说,在linux怎么安装卸载mysql数据库,也许可能比较痛苦,这里简单介绍下,怎么卸载msql数据库。
a)查看系统中是否以rpm包安装的mysql
[plain]
view plaincopy
[root@linux ~]# rpm -qa | grep -i mysql
MySQL-server-5.1.49-1.glibc23
MySQL-client-5.1.49-1.glibc23
卸载MySQL-server-5.1.49-1.glibc23和MySQL-client-5.1.49-1.glibc23
[plain]
view plaincopy
[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23
[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23
b)查看有没有mysql服务
[plain]
view plaincopy
[root@linux ~]# chkconfig --list | grep -i mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
删除mysql服务
[plain]
view plaincopy
[root@linux ~]# chkconfig --del mysql
c)删除分散mysql文件夹
[plain]
view plaincopy
[root@linux ~]# whereis mysql
mysql: /usr/lib/mysql /usr/share/mysql
分别删除
[plain]
view plaincopy
[root@linux lib]# rm -rf /usr/lib/mysql/
[root@linux lib]# rm -rf /usr/share/mysql
通过以上几步,mysql应该已经完全卸载干净了
转载地址:http://blog.csdn.net/love__coder/article/details/6894566
a)查看系统中是否以rpm包安装的mysql
[plain]
view plaincopy
[root@linux ~]# rpm -qa | grep -i mysql
MySQL-server-5.1.49-1.glibc23
MySQL-client-5.1.49-1.glibc23
卸载MySQL-server-5.1.49-1.glibc23和MySQL-client-5.1.49-1.glibc23
[plain]
view plaincopy
[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23
[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23
b)查看有没有mysql服务
[plain]
view plaincopy
[root@linux ~]# chkconfig --list | grep -i mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
删除mysql服务
[plain]
view plaincopy
[root@linux ~]# chkconfig --del mysql
c)删除分散mysql文件夹
[plain]
view plaincopy
[root@linux ~]# whereis mysql
mysql: /usr/lib/mysql /usr/share/mysql
分别删除
[plain]
view plaincopy
[root@linux lib]# rm -rf /usr/lib/mysql/
[root@linux lib]# rm -rf /usr/share/mysql
通过以上几步,mysql应该已经完全卸载干净了
转载地址:http://blog.csdn.net/love__coder/article/details/6894566
相关文章推荐
- 菜鸟学linux
- CentOS6.4 yum服务器安装
- LinuxJDK安装
- linux-tar分卷压缩与解压缩
- Linux kernel多线程的几种实现
- linux c 2-2 goto.c
- Linux中fork函数详解
- 记录自己linux学习的开始
- 七月十六日 Linux操作系统c语言学习笔记
- centos7配置github
- 每天一个Linux命令(sleep&usleep)
- linux下使用crontab实现定时PHP计划任务失败的原因分析
- linux常用指令(新手总结)
- Linux中的经典双链表的实现
- Centos6.4安装opennebula
- Linux下编译并使用ZeroMQ
- Linux下的输入/输出重定向
- linux grep命令详解
- Linux创建特殊设备文件
- linux 清除 命令