Failed to start MariaDB database server. (已解决) 之前配过主从

Posted 不要被骄傲遮蔽了双眼

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Failed to start MariaDB database server. (已解决) 之前配过主从相关的知识,希望对你有一定的参考价值。

[root@linux-node1 /var/log/mariadb]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-11-04 01:33:15 EST; 18s ago
Process: 109775 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 109774 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 109740 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 109774 (code=exited, status=0/SUCCESS)

Nov 04 01:33:09 linux-node1.example.com systemd[1]: Starting MariaDB database server...
Nov 04 01:33:09 linux-node1.example.com mariadb-prepare-db-dir[109740]: Database MariaDB is probabl...
Nov 04 01:33:09 linux-node1.example.com mysqld_safe[109774]: 191104 01:33:09 mysqld_safe Logging ...\'.
Nov 04 01:33:09 linux-node1.example.com mysqld_safe[109774]: 191104 01:33:09 mysqld_safe Starting...ql
Nov 04 01:33:15 linux-node1.example.com systemd[1]: mariadb.service: control process exited, code...=1
Nov 04 01:33:15 linux-node1.example.com systemd[1]: Failed to start MariaDB database server.
Nov 04 01:33:15 linux-node1.example.com systemd[1]: Unit mariadb.service entered failed state.
Nov 04 01:33:15 linux-node1.example.com systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

 

 

 

解决方法:

由于之前配置过主从模式

 

 

删除掉主从的配置文件,重新起来了

不能删除 my.cnf.d文件夹,这样也会启动不起来

 

 

[root@linux-node2 /etc/my.cnf.d]# systemctl restart mariadb
[root@linux-node2 /etc/my.cnf.d]#

 

以上是关于Failed to start MariaDB database server. (已解决) 之前配过主从的主要内容,如果未能解决你的问题,请参考以下文章

CentOS7.2安装mariadb-server,解决Failed to start mysqld.service: Unit not found

Failed to start mongod.service: Unit not found

Error response from daemon: driver failed... Error: failed to start containers...

CentOS7安装mysql后无法启动服务,提示Failed to start mysqld.service: Unit not found

CentOS7 Failed to start LSB: Bring up/down解决方法

CentOS7 Failed to start LSB: Bring up/down