linux卸载mysql数据库

linux卸载mysql数据库,第1张

linux卸载mysql数据库的步骤:

第一步:查看系统中是否以rpm包安装的mysql

[plain] view plaincopyprint?

[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 plaincopyprint?

[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23

[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23

第三步:查看有没有mysql服务

[plain] view plaincopyprint?

[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 plaincopyprint?

[root@linux ~]# chkconfig --del mysql

第五步:删除分散mysql文件夹

[plain] view plaincopyprint?

[root@linux ~]# whereis mysql

mysql: /usr/lib/mysql /usr/share/mysql

第六步:分别删除

[plain] view plaincopyprint?

[root@linux lib]# rm -rf /usr/lib/mysql/

[root@linux lib]# rm -rf /usr/share/mysql

通过以上步骤就可以卸载干净mysql了。

在linux卸载mysql数据库

a)查看系统中是否以rpm包安装的mysql

1

2

3

[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

1

2

[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23

[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23

b)查看有没有mysql服务

1

2

[root@linux ~]# chkconfig --list | grep -i mysql

mysql 0:off 1:off 2:on3:on4:on5:on6:off

删除mysql服务

1

[root@linux ~]# chkconfig --del mysql

c)删除分散mysql文件夹

1

2

[root@linux ~]# whereis mysql

mysql: /usr/lib/mysql /usr/share/mysql

分别删除

1

2

[root@linux lib]# rm -rf /usr/lib/mysql/

[root@linux lib]# rm -rf /usr/share/mysql

通过以上几步,mysql应该已经完全卸载干净了!!!在linux卸载mysql数据库:

a)查看系统中是否以rpm包安装的mysql

1

2

3

[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

1

2

[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23

[root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23

b)查看有没有mysql服务

1

2

[root@linux ~]# chkconfig --list | grep -i mysql

mysql 0:off 1:off 2:on3:on4:on5:on6:off

删除mysql服务

1

[root@linux ~]# chkconfig --del mysql

c)删除分散mysql文件夹

1

2

[root@linux ~]# whereis mysql

mysql: /usr/lib/mysql /usr/share/mysql

分别删除

1

2

[root@linux lib]# rm -rf /usr/lib/mysql/

[root@linux lib]# rm -rf /usr/share/mysql

通过以上几步,mysql应该已经完全卸载干净了!!!


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/8364153.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存