I have a mariadb 10.1.20 cluster with 5 nodes.

I don't know root password so I did the following steps:

  1. On second node, I stopped mysql service
  2. I set wsrep = OFF on /etc/my.cnf.d/server.cnf
  3. I executed instructions to reset root password, now password root is empty.
  4. I started mysql service and I logged as root and it works well until now.

But when I set wsrep = ON and then restarted mysql service I got the following error using systemctl status mariadb.service | more:

mariadb.service - MariaDB database server
  Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
 Drop-In: /etc/systemd/system/mariadb.service.d
  Active: failed (Result: exit-code) since Tue 2018-02-27 16:18:29 PET; 7s ago
 Process: 27727 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Process: 2091 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
 Process: 1695 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
 Process: 1693 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 2091 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Feb 27 16:18:24 cluster-test-node-2.reniec.gob.pe systemd[1]: Starting MariaDB database server...
Feb 27 16:18:25 cluster-test-node-2.reniec.gob.pe sh[1695]: 2018-02-27 16:18:25
139937440761984 [Note] /usr/sbin/mysqld (mysqld 10.1.18-MariaDB) starting as process 2050 ...
Feb 27 16:18:27 cluster-test-node-2.reniec.gob.pe sh[1695]: WSREP: Recovered position bbbe7e3b-4e00-11e6-bb1e-4e7ce2820fe5:8300414
Feb 27 16:18:28 cluster-test-node-2.reniec.gob.pe mysqld[2091]: 2018-02-27 16:18:28 140112964700288 [Note] /usr/sbin/mysqld (mysqld 10.1.18-MariaDB) starting as process 2091 ...
Feb 27 16:18:29 cluster-test-node-2.reniec.gob.pe systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Feb 27 16:18:29 cluster-test-node-2.reniec.gob.pe systemd[1]: Failed to start MariaDB database server.
Feb 27 16:18:29 cluster-test-node-2.reniec.gob.pe systemd[1]: Unit mariadb.service entered failed state.

Mysql service on second node turns on when wsrep is OFF.

What is missing in this case?

  • Sounds like it caught you for trying to hack into the cluster by disabling security.
    – Rick James
    Mar 6, 2018 at 15:29

1 Answer 1


I solved by giving permissions (read/write) to grastate.dat

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .