Desinstale e reinstale o banco de dados MariaDB no Centos7

Consulte os componentes do MariaDB instalados:

[root@localhost logs]# rpm -qa | grep Maria*
MariaDB-server-5.5.49-1.el7.centos.x86_64
MariaDB-common-5.5.49-1.el7.centos.x86_64
MariaDB-client-5.5.49-1.el7.centos.x86_64
[root@localhost ~]#

Desmonte o banco de dados:

[root@localhost logs]# yum -y remove mari*
...
Removed:
  mariadb.x86_64 1:5.5.56-2.el7

Dependency Removed:
  mariadb-server.x86_64 1:5.5.56-2.el7

Complete!
[root@localhost ~]#

Ver arquivos legados:

[root@localhost ~]# ls /etc/my.cnf
/etc/my.cnf
[root@localhost ~]# 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@localhost ~]#

excluir

[root@localhost ~]# rm -rf /etc/my.cnf
[root@localhost ~]# rm -rf /var/lib/mysql/*

reinstalar

[root@localhost ~]# yum install -y mariadb mariadb-server

comece

[root@localhost ~]# systemctl start mariadb

definir início automático

[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# systemctl enable mariadb

banco de dados de configuração

[root@localhost ~]# mysql_secure_installation

Acho que você gosta

Origin blog.csdn.net/the_liang/article/details/84871782
Recomendado
Clasificación