MySQL server was running fine last night, but this morning, when I tried to hit the Bugzilla server, I found it down. I tried to start it, but I get:
Job for mysql.service failed because the control process exited with
error code. See "systemctl status mysql.service" and "journalctl -xe" for
details.
I have done a few google searches and found a bunch of questions. I tried some of the answers, but the server is still down. I have plenty of space,
root@GBRTEF01LX005:/home/bzadmin# df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 396M 5.8M 390M 2% /run
/dev/mapper/CMS--UBN--TEMPLATE--1--vg-root 75G 4.8G 66G 7% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda1 472M 106M 342M 24% /boot
tmpfs 396M 0 396M 0% /run/user/1001
I have also added more swap space for InnoDB,
innodb_buffer_pool_size = 20M
which is one of the suggestion I found, and lastly, here is the last 30 lines of journalctl -xe
,
root@GBRTEF01LX005:/home/bzadmin# journalctl -xe | tail -30
Feb 25 16:26:23 GBRTEF01LX005 systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Feb 25 16:26:23 GBRTEF01LX005 systemd[1]: mysql.service: Unit entered failed state.
Feb 25 16:26:23 GBRTEF01LX005 systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 25 16:26:23 GBRTEF01LX005 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Feb 25 16:26:23 GBRTEF01LX005 systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Feb 25 16:26:23 GBRTEF01LX005 systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Feb 25 16:26:23 GBRTEF01LX005 audit[11846]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11846/status" pid=11846 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=107 ouid=107
Feb 25 16:26:23 GBRTEF01LX005 audit[11846]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=11846 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=107 ouid=0
Feb 25 16:26:23 GBRTEF01LX005 audit[11846]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11846/status" pid=11846 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=107 ouid=107
Feb 25 16:26:23 GBRTEF01LX005 kernel: audit: type=1400 audit(1519575983.239:317): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11846/status" pid=11846 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=107 ouid=107
Feb 25 16:26:23 GBRTEF01LX005 kernel: audit: type=1400 audit(1519575983.239:318): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=11846 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=107 ouid=0
Feb 25 16:26:23 GBRTEF01LX005 kernel: audit: type=1400 audit(1519575983.239:319): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/11846/status" pid=11846 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=107 ouid=107
Feb 25 16:26:25 GBRTEF01LX005 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Any help would be greatly appreciated! thanks.
josé
I encountered this error on Armbian 20.08.5 Bionic with Linux 5.4.65.
The problem was a missing log directory at
/var/log/mysql
, indicated by a log entry in/var/log/syslog
. Creating the directory/var/log/mysql
with ownermysql
and groupadm
fixed it for me.