1

I updated my mysql and I can't start it now. I try:

sudo service mysql start

Result:

Job for mariadb.service failed because a timeout was exceeded. See "systemctl status mariadb.service" and "journalctl -xe" for details.

systemctl status mariadb.service:

mariadb.service - MariaDB 10.3.9 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: timeout) since Tue 2018-10-02 14:08:01 CEST; 1min 57s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 19223 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 19069 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: 19060 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 19049 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 19223 (code=exited, status=0/SUCCESS)

Okt 02 14:08:00 supr-german mysqld[19223]: 2018-10-02 14:08:00 0 [Note] Event Scheduler: Purging the queue. 0 events
Okt 02 14:08:00 supr-german mysqld[19223]: 2018-10-02 14:08:00 0 [Note] InnoDB: FTS optimize thread exiting.
Okt 02 14:08:00 supr-german mysqld[19223]: 2018-10-02 14:08:00 0 [Note] InnoDB: Starting shutdown...
Okt 02 14:08:00 supr-german mysqld[19223]: 2018-10-02 14:08:00 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
Okt 02 14:08:00 supr-german mysqld[19223]: 2018-10-02 14:08:00 0 [Note] InnoDB: Buffer pool(s) dump completed at 181002 14:08:00
Okt 02 14:08:01 supr-german mysqld[19223]: 2018-10-02 14:08:01 0 [Note] InnoDB: Shutdown completed; log sequence number 1630932; transaction id 22
Okt 02 14:08:01 supr-german mysqld[19223]: 2018-10-02 14:08:01 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Okt 02 14:08:01 supr-german mysqld[19223]: 2018-10-02 14:08:01 0 [Note] /usr/sbin/mysqld: Shutdown complete
Okt 02 14:08:01 supr-german systemd[1]: mariadb.service: Failed with result 'timeout'.
Okt 02 14:08:01 supr-german systemd[1]: Failed to start MariaDB 10.3.9 database server.

journalctl -xe:

Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=19223 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=125 ouid=0
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="create" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="getsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="getopt" denied_mask="getopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=19223 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=125 ouid=0
Okt 02 14:08:01 supr-german mysqld[19223]: 2018-10-02 14:08:01 0 [Note] InnoDB: Shutdown completed; log sequence number 1630932; transaction id 22
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="unlink" profile="/usr/sbin/mysqld" name="/var/lib/mysql/ibtmp1" pid=19223 comm="mysqld" requested_mask="d" denied_mask="d" fsuid=125 ouid=125
Okt 02 14:08:01 supr-german mysqld[19223]: 2018-10-02 14:08:01 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="unlink" profile="/usr/sbin/mysqld" name="/run/mysqld/mysqld.pid" pid=19223 comm="mysqld" requested_mask="d" denied_mask="d" fsuid=125 ouid=125
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="create" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="getsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="getopt" denied_mask="getopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="signal" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" requested_mask="send" denied_mask="send" signal=term peer="/usr/sbin/mysqld"
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="signal" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" requested_mask="receive" denied_mask="receive" signal=term peer="/usr/sbin/mysqld"
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=19223 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=125 ouid=0
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="create" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="getsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="getopt" denied_mask="getopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="setsockopt" profile="/usr/sbin/mysqld" pid=19223 comm="mysqld" family="unix" sock_type="dgram" protocol=0 requested_mask="setopt" denied_mask="setopt" addr=none
Okt 02 14:08:01 supr-german audit[19223]: AVC apparmor="ALLOWED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=19223 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=125 ouid=0
Okt 02 14:08:01 supr-german mysqld[19223]: 2018-10-02 14:08:01 0 [Note] /usr/sbin/mysqld: Shutdown complete
Okt 02 14:08:01 supr-german systemd[1]: mariadb.service: Failed with result 'timeout'.
Okt 02 14:08:01 supr-german systemd[1]: Failed to start MariaDB 10.3.9 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mariadb.service has failed.
-- 
-- The result is RESULT.
Okt 02 14:08:01 supr-german sudo[19286]: pam_unix(sudo:session): session closed for user root
Okt 02 14:09:00 supr-german systemd[1]: Starting Clean php session files...
-- Subject: Unit phpsessionclean.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit phpsessionclean.service has begun starting up.
Okt 02 14:09:00 supr-german php7.2[19400]: DIGEST-MD5 common mech free
Okt 02 14:09:00 supr-german php7.2[19416]: DIGEST-MD5 common mech free
Okt 02 14:09:00 supr-german php7.0[19429]: DIGEST-MD5 common mech free
Okt 02 14:09:00 supr-german php7.0[19442]: DIGEST-MD5 common mech free
Okt 02 14:09:00 supr-german systemd[1]: Started Clean php session files.
-- Subject: Unit phpsessionclean.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit phpsessionclean.service has finished starting up.
-- 
-- The start-up result is RESULT.
Okt 02 14:09:01 supr-german CRON[19490]: pam_unix(cron:session): session opened for user root by (uid=0)
Okt 02 14:09:01 supr-german CRON[19491]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Okt 02 14:09:01 supr-german CRON[19490]: pam_unix(cron:session): session closed for user root
Okt 02 14:10:20 supr-german systemd-resolved[941]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
Okt 02 14:10:25 supr-german sm-mta[19512]: STARTTLS=client, relay=mailin2.rmx.de., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Okt 02 14:10:30 supr-german sm-mta[19512]: w91AbStK016528: to=<philipp.walter@wirecard.com>, ctladdr=<german@supr-german> (1000/1000), delay=1+01:33:01, xdelay=00:00:11, mailer=esmtp, pri=7965282, relay=mailin2.rmx.de. [217.111.120.2], dsn=4.1.8, stat=Deferred: 450 4.1.8
Okt 02 14:10:31 supr-german systemd-resolved[941]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
Okt 02 14:10:36 supr-german sm-mta[19512]: STARTTLS=client, relay=mailin4.rmx.de., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Okt 02 14:10:42 supr-german sm-mta[19512]: w91AbStK016528: to=<philipp.walter@wirecard.com>, ctladdr=<german@supr-german> (1000/1000), delay=1+01:33:13, xdelay=00:00:23, mailer=esmtp, pri=7965282, relay=mailin4.rmx.de. [217.111.120.4], dsn=4.1.8, stat=Deferred: 450 4.1.8
Okt 02 14:10:42 supr-german systemd-resolved[941]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.

Can somebody help me? I have tried to reinstal MariaDB, but it didn't helped :(

4
  • Since this is not really a programming question, you would probably get a better response on unix.stackexchange.com – Mawg Oct 2 '18 at 12:27
  • 1
    Can you share with us the output of: tail -50 /var/log/mariadb/mariadb.log – dossy Oct 2 '18 at 12:50
  • @dossy thanks. I found the error there ;) – krut1 Oct 2 '18 at 13:55
  • @krut1 Glad I could help. :) – dossy Oct 2 '18 at 16:01
0

The problem was:

ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded

Solution:

sudo systemctl stop mariadb
mysqld_safe --skip-grant-tables &
mysql -uroot
use mysql;
update user set plugin="mysql_native_password" where User="root";
quit;
kill -9 $(pgrep mysql)
sudo systemctl start mariadb

And now we can see:

sudo systemctl status mariadb

mariadb.service - MariaDB 10.3.9 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2018-10-02 15:45:27 CEST; 2s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 3418 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 3404 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
  Process: 3264 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: 3252 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 3240 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 3353 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 31 (limit: 4915)
   CGroup: /system.slice/mariadb.service
           └─3353 /usr/sbin/mysqld

After this MariaDB was be able to start.

P.S. Also I needed to add my root pass in the config [/etc/mysql/my.cng]:

[client]
# Default is Latin1, if you need UTF-8 set this (also in server section)
#default-character-set = utf8
password    = qwerty

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy