linux下终于把MySQL卸载掉了
来源:互联网 发布:新潮都网络服装城地址 编辑:程序博客网 时间:2024/04/25 20:21
linux下开发,mysql数据库是经常用到的,对于初学者来说,在linux怎么安装卸载mysql数据库,也许可能比较痛苦,这里简单介绍下,怎么卸载msql数据库。a)查看系统中是否以rpm包安装的mysql[plain] view plaincopy01.[root@linux ~]# rpm -qa | grep -i mysql 02.MySQL-server-5.1.49-1.glibc23 03.MySQL-client-5.1.49-1.glibc23 卸载MySQL-server-5.1.49-1.glibc23和MySQL-client-5.1.49-1.glibc23[plain] view plaincopy01.[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23 02.[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23 b)查看有没有mysql服务[plain] view plaincopy01.[root@linux ~]# chkconfig --list | grep -i mysql 02.mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off 删除mysql服务[plain] view plaincopy01.[root@linux ~]# chkconfig --del mysql c)删除分散mysql文件夹[plain] view plaincopy01.[root@linux ~]# whereis mysql 02.mysql: /usr/lib/mysql /usr/share/mysql 分别删除[plain] view plaincopy01.[root@linux lib]# rm -rf /usr/lib/mysql/ 02.[root@linux lib]# rm -rf /usr/share/mysql [root@localhost mysql]# rpm –qa | grep mysql 有的话一个一个删除掉,用rpm -e命令,然后查找一下残留的文件: [root@localhost mysql]# cd / [root@localhost /]# find / -name mysql 如果查找到rm -rf filename删除. [root@localhost /]# find / -name my.cnf 如果查找到删除,一般my.cnf是在/etc/my.cnf这里.查找的时候小心别给mysql数据库删了就ok了通过以上几步,mysql应该已经完全卸载干净了