Let's make a note... -StartingFromNothing-

Wednesday, August 22, 2018

Mariadb and mysql active failed or status failure

I can't start mariadb and or mysql a few hours ago after disable mysql.service and mariadb.service.

Then I do check status:

$ sudo systemctl status mysql.service
AND
$ sudo systemctl status mariadb.service

Result:

  Active: failed (Result: exit-code)
  (code=exited, status=1/FAILURE)

How to resolve this:

$ sudo systemctl disable mysql.service
$ sudo systemctl disable mariadb.service

Or do opposite (make sure both mysql.service and mariadb.service are disabled)

then, do the right step:

should do first:

$ sudo systemctl enable mysql.service

then:

$ sudo systemctl enable mariadb.service

and check:

$ sudo systemctl status mysql.service
AND
$ sudo systemctl status mariadb.service

This give me result in both service:

  Active: inactive (dead)
  (code=exited, status=0/SUCCESS)

Run test:

$ sudo systemctl start mysql.service
AND
$ sudo systemctl start mariadb.service

Yes, it works for me! Hope it help.