[转]CentOS 7.x 卸载删除MariaDB,重新安装
1、卸载
[ ~]# 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 ~]#
[ ~]# 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 ~]#
2、删除遗留目录
[ ~]# 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 ~]#
[ ~]# rm -rf /etc/my.cnf [ ~]# rm -rf /var/lib/mysql/
3、重新安装
[ ~]# yum install -y mariadb mariadb-server [ ~]# systemctl start mariadb [ ~]# systemctl enable mariadb [ ~]# mysql_secure_installation
From: https://blog.csdn.net/chengyuqiang/article/details/80210416
补充:
mysql_secure_installation可参考: https://baijiahao.baidu.com/s?id=1645005043180459694
相关推荐
Gexrior 2020-10-22
Lostinthewoods 2020-10-29
txt 2020-06-14
azhou 2020-06-12
hungzz 2020-06-11
CharlesYooSky 2020-06-05
aliuge 2020-06-03
URML 2020-05-30
lwwishes 2020-05-29
83173052 2020-05-29
tanyhuan 2020-05-28
饮马天涯 2020-05-20
aliuge 2020-05-12
83173052 2020-05-10
Mrbianxin 2020-05-07
InJavaWeTrust 2020-05-04
hungzz 2020-04-23