CentOS 7.x 卸载删除MariaDB,重新安装
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
1、卸载
[root@node1 ~]# rpm -qa|grep mariadb
mariadb-5.5.56-2.el7.x86_64
mariadb-libs-5.5.56-2.el7.x86_64
mariadb-server-5.5.56-2.el7.x86_64
[root@node1 ~]#
1
- 2
- 3
- 4
- 5
[root@node1 ~]# yum remove mariadb
...
Removed:
mariadb.x86_64 1:5.5.56-2.el7
Dependency Removed:
mariadb-server.x86_64 1:5.5.56-2.el7
Complete!
[root@node1 ~]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
2、删除遗留目录
[root@node1 ~]# ls /etc/my.cnf
/etc/my.cnf
[root@node1 ~]# ll /var/lib/mysql/
total 28700
-rw-rw---- 1 mysql mysql 16384 May 5 10:31 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 May 5 10:31 aria_log_control
-rw-rw---- 1 mysql mysql 18874368 May 5 10:31 ibdata1
-rw-rw---- 1 mysql mysql 5242880 May 5 10:31 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Oct 6 2017 ib_logfile1
drwx------ 2 mysql mysql 4096 Oct 6 2017 mysql
drwx------ 2 mysql mysql 4096 Oct 6 2017 performance_schema
[root@node1 ~]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
[root@node1 ~]# rm -rf /etc/my.cnf
[root@node1 ~]# rm -rf /var/lib/mysql/