D
D
DVoropaev2019-03-23 01:24:28
linux
DVoropaev, 2019-03-23 01:24:28

Why won't MariaDB start?

Demolished mariadb. After re-installation, it does not start:

● mariadb.service - MariaDB 10.1.38 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Sat 2019-03-23 02:09:56 +04; 1min 2s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 15662 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 15587 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]  
  Process: 15585 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 15584 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 15662 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

мар 23 02:07:44 dima-X402CA systemd[1]: Starting MariaDB 10.1.38 database server...
мар 23 02:07:45 dima-X402CA mysqld[15662]: 2019-03-23  2:07:45 140485530287232 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0ubuntu
мар 23 02:09:14 dima-X402CA systemd[1]: mariadb.service: Start operation timed out. Terminating.
мар 23 02:09:56 dima-X402CA systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
мар 23 02:09:56 dima-X402CA systemd[1]: mariadb.service: Failed with result 'timeout'.
мар 23 02:09:56 dima-X402CA systemd[1]: Failed to start MariaDB 10.1.38 database server.

I found this guide here:

sudo aa-status shows you what apparmor is doing; what actually has an enforced policy, versus what's just set to complain.
sudo apt-get install apparmor-utils adds a few commands that make the apparmor profiles easier to deal with, such as...
sudo aa-complain /usr/sbin/mysqld turns the profile from "enforce" to complain. (aa-enforce turns it back.)
Once that's done, sudo service apparmor reload restarts apparmor, and voila... sudo /etc/init.d/mysql start works, and the server stays up.

but:
sudo aa-complain /usr/sbin/mysqld
[sudo] пароль для dima: 
Назначение /usr/sbin/mysqld претензионного режима.
ERROR: /etc/apparmor.d/usr.sbin.mysqld не содержит профиль

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question