Centos 解除安裝 MySQL
阿新 • • 發佈:2020-12-30
1 [root@mongodb-poc-0003 ~]# cat /etc/redhat-release 2 CentOS Linux release 8.0.1905 (Core) 3 [root@mongodb-poc-0003 ~]# rpm -qa | grep -i mysql 4 [root@mongodb-poc-0003 ~]# whereis mysql 5 mysql: /usr/local/mysql 6 [root@mongodb-poc-0003 ~]# chkconfig --list | grep -i mysql 7 8 Note: This output shows SysV services only and does not include native9 systemd services. SysV configuration data might be overridden by native 10 systemd configuration. 11 12 If you want to list systemd services use 'systemctl list-unit-files'. 13 To see services enabled on particular target use 14 'systemctl list-dependencies [target]'.15 16 mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off 17 [root@mongodb-poc-0003 ~]# find / -name mysql 18 /usr/share/selinux/targeted/default/active/modules/100/mysql 19 /usr/local/mysql 20 /usr/local/mysql/include/mysql 21 /usr/local/mysql/bin/mysql 22 /usr/local/mysql/data/mysql 23 /home/mysql 24 /var/spool/mail/mysql25 /var/lib/selinux/targeted/active/modules/100/mysql 26 [root@mongodb-poc-0003 ~]# rm -rf /usr/local/mysql 27 [root@mongodb-poc-0003 ~]# rm -rf /home/mysql 28 [root@mongodb-poc-0003 ~]# whereis mysql 29 mysql: 30 [root@mongodb-poc-0003 ~]#
停止並刪除自啟動服務
1 chkconfig --del mysqld 2 rm -rf /etc/init.d/mysqld