MariaDB not starting anymore after upgrade

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=9 G_DIETPI_VERSION_RC=0 G_GITBRANCH='master' G_GITOWNER='MichaIng' G_LIVE_PATCH_STATUS[0]='applied' G_LIVE_PATCH_STATUS[1]='applied' G_LIVE_PATCH_STATUS[2]='not applicable'
  • Distro version | bullseye
  • Kernel version | Linux DietPi 3.10.38 #22 SMP PREEMPT Fri Dec 22 10:45:41 IST 2017 armv7l GNU/Linux
  • Architecture | armhf
  • SBC model | Sparky SBC (armv7l)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

Expected behaviour

Actual behaviour

Extra details

Why not checking for similar topics and related investigation steps?

journalctl -u mariadb.service

I already checked and tried but no success.

root@DietPi:~# journalctl -u mariadb.service
-- Journal begins at Wed 2025-01-01 17:30:39 CET, ends at Wed 2025-01-01 19:57:45 CET. --
Jan 01 17:30:43 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:30:45 DietPi systemd[979]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:30:45 DietPi systemd[979]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:30:45 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:30:45 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:30:45 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.

Well why not sharing the troubleshooting steps done already? Insted submitting a topic with 0 information included.

Anyway, i found a similar topic on a German Nextcloud forum NC28 "Internal Server Error" und mysql-Datenbank (mariadb) lässt sich nicht starten - 🇩🇪 Deutsch (german) - Nextcloud community

Can you share following

systemctl cat mariadb.service

It‘s difficult to repeat, I tried different things. Mainly I uninstalled and re-installed mariadb but as said the problem remains unfortunately.

root@DietPi:~# systemctl cat mariadb.service
# /lib/systemd/system/mariadb.service
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades.  If you want to customize, the
# best way is to create a file "/etc/systemd/system/mariadb.service",
# containing
#       .include /usr/lib/systemd/system/mariadb.service
#       ...make your changes here...
# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
# which doesn't need to include ".include" call and which will be parsed
# after the file mariadb.service itself is parsed.
#
# For more info about custom unit files, see systemd.unit(5) or
# https://mariadb.com/kb/en/mariadb/systemd/
#
# Copyright notice:
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=MariaDB 10.5.26 database server
Documentation=man:mariadbd(8)
Documentation=https://mariadb.com/kb/en/library/systemd/
After=network.target

[Install]
WantedBy=multi-user.target


[Service]

##############################################################################
## Core requirements
##

Type=notify

# Setting this to true can break replication and the Type=notify settings
# See also bind-address mariadbd option.
PrivateNetwork=false

##############################################################################
## Package maintainers
##

User=mysql
Group=mysql

# CAP_IPC_LOCK To allow memlock to be used as non-root user
# CAP_DAC_OVERRIDE To allow auth_pam_tool (which is SUID root) to read /etc/shadow when it's chmod 0
#   does nothing for non-root, not needed if /etc/shadow is u+r
# CAP_AUDIT_WRITE auth_pam_tool needs it on Debian for whatever reason
AmbientCapabilities=CAP_IPC_LOCK CAP_DAC_OVERRIDE CAP_AUDIT_WRITE

# PrivateDevices=true implies NoNewPrivileges=true and
# SUID auth_pam_tool suddenly doesn't do setuid anymore
PrivateDevices=false

# Prevent writes to /usr, /boot, and /etc
ProtectSystem=full



# Doesn't yet work properly with SELinux enabled
# NoNewPrivileges=true

# Prevent accessing /home, /root and /run/user
ProtectHome=true

# Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true

ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld

# Perform automatic wsrep recovery. When server is started without wsrep,
# galera_recovery simply returns an empty string. In any case, however,
# the script is not expected to return with a non-zero status.
# It is always safe to unset _WSREP_START_POSITION environment variable.
# Do not panic if galera_recovery script is not available. (MDEV-10538)
ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
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"

# Needed to create system tables etc.
# ExecStartPre=/usr/bin/mysql_install_db -u mysql

# Start main service
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
# Use the [Service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION

# Unset _WSREP_START_POSITION environment variable.
ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"

ExecStartPost=/etc/mysql/debian-start

KillSignal=SIGTERM

# Don't want to see an automated SIGKILL ever
SendSIGKILL=no

# Restart crashed server only, on-failure would also restart, for example, when
# my.cnf contains unknown option
Restart=on-abort
RestartSec=5s

UMask=007

##############################################################################
## USERs can override
##
##
## by creating a file in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
## and adding/setting the following under [Service] will override this file's
## settings.

# Useful options not previously available in [mysqld_safe]

# Kernels like killing mariadbd when out of memory because its big.
# Lets temper that preference a little.
# OOMScoreAdjust=-600

# Explicitly start with high IO priority
# BlockIOWeight=1000

# If you don't use the /tmp directory for SELECT ... OUTFILE and
# LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
PrivateTmp=false

# Set an explicit Start and Stop timeout of 900 seconds (15 minutes!)
# this is the same value as used in SysV init scripts in the past
# Galera might need a longer timeout, check the KB if you want to change this:
# https://mariadb.com/kb/en/library/systemd/#configuring-the-systemd-service-timeout
TimeoutStartSec=900
TimeoutStopSec=900

# Set the maximium number of tasks (threads) to 99% of what the system can
# handle as set by the kernel, reserve the 1% for a remote ssh connection,
# some monitoring, or that backup cron job. Without the directive this would
# be 15% (see DefaultTasksMax in systemd man pages).
TasksMax=99%

##
## Options previously available to be set via [mysqld_safe]
## that now needs to be set by systemd config files as mysqld_safe
## isn't executed.
##

# Number of files limit. previously [mysqld_safe] open-files-limit
LimitNOFILE=32768

# Maximium core size. previously [mysqld_safe] core-file-size
# LimitCore=

# Nice priority. previously [mysqld_safe] nice
# Nice=-5

# Timezone. previously [mysqld_safe] timezone
# Environment="TZ=UTC"

# Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
# (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
# Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=

# Flush caches. previously [mysqld_safe] flush-caches=1
# ExecStartPre=sync
# ExecStartPre=sysctl -q -w vm.drop_caches=3

# numa-interleave=1 equalivant
# Change ExecStart=numactl --interleave=all /usr/sbin/mariadbd......

# crash-script equalivent
# FailureAction=

# /etc/systemd/system/mariadb.service.d/dietpi.conf
[Unit]
Before=cron.service
root@DietPi:~#

As a workaround you can try to comment out this line within /lib/systemd/system/mariadb.service. That should at least allow MariaDB to start again. But I’m not sure about the side effects.

Unfortunately MariaDB doesn‘t start. Any other idea what I could do?

Maybe you can share another fresh log after you have customized the service file?

Sure, here it is


root@DietPi:~# journalctl -u mariadb.service
-- Journal begins at Wed 2025-01-01 17:30:39 CET, ends at Wed 2025-01-01 21:33:05 CET. --
Jan 01 17:30:43 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:30:45 DietPi systemd[979]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:30:45 DietPi systemd[979]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:30:45 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:30:45 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:30:45 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:34:56 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:34:57 DietPi systemd[2326]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:34:57 DietPi systemd[2326]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:34:57 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:34:57 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:34:57 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:53:54 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:53:54 DietPi systemd[4850]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:53:54 DietPi systemd[4850]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:53:54 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:53:54 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:53:54 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:54:32 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:54:32 DietPi systemd[4919]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:54:32 DietPi systemd[4919]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:54:33 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:54:33 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:54:33 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:55:05 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:55:06 DietPi systemd[4988]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:55:06 DietPi systemd[4988]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:55:06 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:55:06 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:55:06 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:55:34 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:55:34 DietPi systemd[5054]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:55:34 DietPi systemd[5054]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:55:34 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:55:34 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:55:34 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:55:50 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:55:51 DietPi systemd[5115]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:55:51 DietPi systemd[5115]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:55:51 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:55:51 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:55:51 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:56:04 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:56:04 DietPi systemd[5176]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:56:04 DietPi systemd[5176]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:56:04 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:56:04 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:56:04 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:35:23 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:35:23 DietPi systemd[6517]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:35:23 DietPi systemd[6517]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:35:24 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:35:24 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:35:24 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:36:10 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:36:10 DietPi systemd[6672]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:36:10 DietPi systemd[6672]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:36:10 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:36:10 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:36:10 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:36:13 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:36:13 DietPi systemd[6752]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:36:13 DietPi systemd[6752]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:36:13 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:36:13 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:36:13 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:36:31 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:36:32 DietPi systemd[6837]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:36:32 DietPi systemd[6837]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:36:32 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:36:32 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:36:32 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 21:21:32 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 21:21:32 DietPi systemd[9616]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 21:21:32 DietPi systemd[9616]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 21:21:32 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 21:21:32 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 21:21:32 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 21:29:10 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid HymsBUI0mx1wypqx2sSsrnvCias= as process 10475
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: !!! innodb_force_recovery is set to 6 !!!
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Started in read only mode
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Uses event mutexes
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Number of pools: 1
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Using generic crc32 instructions
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Disabling background log and ibuf IO write threads.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Warning] InnoDB: Unable to open "./ib_logfile0" to check native AIO read support.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Warning] InnoDB: Linux Native AIO disabled.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Completed initialization of buffer pool
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] InnoDB: Cannot create log file in read-only mode
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] InnoDB: Plugin initialization aborted with error Read only transaction
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Starting shutdown...
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] Plugin 'FEEDBACK' is disabled.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] Aborting
Jan 01 21:29:11 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 01 21:29:11 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 21:29:11 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
root@DietPi:~#  

The database is now starting, but has a different problem now.

Usually this error occurs when MariaDB server is attempting to create or modify files in a directory where it does not have sufficient permissions or if the database directory is mounted as read-only.

Can you check for kernel error messages

dmesg -l 0,1,2,3

and some more information on your file system

readlink /var/lib/mysql
readlink -f /var/lib/mysql
ls -la /mnt/dietpi_userdata/mysql
root@DietPi:~# dmesg -l 0,1,2,3
[    0.363155] i2c i2c-2: of_i2c: invalid reg on /i2c@b0178000/mpu6515@68
[    0.384019] atc260x_i2c 0-0065: icm_ohm not config, use default value
[    0.408483] atc260x-switch-ldo atc2603c-switch1.1: pmic_ver=0
[    0.413136] atc260x-pm atc2603c-pm.0: _set_s2_mode() can not get of_property s2_mode 
[    0.916716] owl_dss DSI: error!dsihw_parse_params, fail to get lcd reset gpio
[    0.965995] no blk dev
[    0.966008] read MiscInfoHeader failed
[    0.966017] read Head failed
[    0.966026] OWL_HDMI_ERR: failed to read hdcp key from secure storage
[    0.966609] Bluetooth: HCI Realtek H5 protocol registration failed
[    0.978309] pcm512x 2-004c: Failed to reset device: -6
[    0.978888] pcm512x 2-004d: Failed to reset device: -6
[    0.983358] [SNDRV]:[atc2603a_get_cfg] Fail to get device_node

[    0.983370] [SNDRV]:[atc2603a_init] audio get cfg failed!

[    0.983720] [SNDRV]:[atc2603c_platform_probe] atc2603c_platform_probe

[    0.983746] [SNDRV]:[atc2603c_platform_probe] what's my lucky draw 220

[    0.984199] [SNDRV]:[atm7059_dai_probe] it's ok 0

[    0.984952] [SNDRV]:[atm7059_link_init] atm7059_link_init

[    0.985000] [SNDRV]:[atm7059_audio_gpio_init] find i2s_switch_gpio property fail

[    0.985014] [SNDRV]:[atm7059_audio_gpio_init] find earphone_detect_gpios property fail

[    0.985038] [SNDRV]:[atm7059_audio_gpio_init] GPIO[126] request failed

[    0.985049] [SNDRV]:[atm7059_link_init] maybe using irq
[    1.130137] atc2603c-audio atc260x-audio: ASoC: Failed to add route AOUT FL FR Mixer -> AOUT MIXER -> ADC0 Mux
[    1.142994] train_Msize:1024, train_ces:1
[    1.164735] start:0xc0008000, end:0xc0bff2d8, checksum:0xf0b02035
[    2.967256] read_mi_head, line 429, magic 0x0, length 0, item num 0
[    2.967288] read Head null
[    2.967310] OWL_HDMI_ERR: failed to read hdcp key from secure storage
[    5.872336] FAT-fs (mmcblk0p1): codepage cp437 not found
[    5.874146] FAT-fs (mmcblk0p1): codepage cp437 not found
[    5.876809] EXFAT: Codepage cp437 not found
[    8.438388] EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
[    8.438819] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
[   11.737691] set port reset!80
[   11.818074] found sparky chip 80e46316d0d4997 provisioned
[   11.818250] idx 389 newmac 17f7010186
[   11.862094] set port reset!80
[   11.971416] atc260x-irkeypad atc2603c-irkeypad.0: Get ir_ch failed ret = -22 
[   12.157735] set port reset!80
[   12.277941] set port reset!80
[   13.038473] proc: unrecognized mount option "hidepid=invisible" or missing value
[   20.123082] proc: unrecognized mount option "hidepid=invisible" or missing value
root@DietPi:~#
root@DietPi:~# readlink /var/lib/mysql
readlink -f /var/lib/mysql
ls -la /mnt/dietpi_userdata/mysql
/mnt/dietpi_userdata/mysql
/mnt/dietpi_userdata/mysql
total 12396
drwxr-xr-x 5 mysql  mysql      4096 Jan  1 21:29 .
drwxrwxr-x 9 dietpi dietpi     4096 Dec 18  2021 ..
drwx------ 2 mysql  mysql      4096 Mar 20  2022 allo
-rw-rw---- 1 mysql  mysql     73728 Jan  1 21:29 aria_log.00000001
-rw-rw---- 1 mysql  mysql        52 Jan  1 21:29 aria_log_control
-rw-r--r-- 1 root   root          0 Jan  1 15:06 debian-10.5.flag
-rw-rw---- 1 mysql  mysql      1590 Jan  1 15:01 ib_buffer_pool
-rw-rw---- 1 mysql  mysql  12582912 Jan  1 15:01 ibdata1
-rw-rw---- 1 mysql  mysql         0 Dec 18  2021 multi-master.info
drwx------ 2 mysql  mysql      4096 Dec 18  2021 mysql
-rw-rw---- 1 root   mysql        16 Dec 18  2021 mysql_upgrade_info
drwx------ 2 mysql  mysql      4096 Dec 18  2021 performance_schema
root@DietPi:~#  

The crazy thing is I didn‘t change anything but just performing the dietpi update and the problem started.

I don’t think it has anything to do with the DietPi update directly. It is more likely that other apt packages were also updated or the error was triggered by the restart and was already present.

At least with the directory and the permissions everything seems to be correct.

What about the available disk space?

df -h

BTW: if you have backup done beforehand, you could try to restore this to get your service back

root@DietPi:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
none            495M  7.8M  487M   2% /run
udev             10M     0   10M   0% /dev
tmpfs           495M   12K  495M   1% /dev/shm
/dev/mmcblk0p2   15G  1.6G   13G  12% /
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs           494M     0  494M   0% /tmp
tmpfs            50M  104K   50M   1% /var/log
/dev/mmcblk0p1   48M   12M   37M  25% /boot
root@DietPi:~#

Unfortunately I don‘t have a backup unless dietpi creates backup before an update?

on user request only.

Can you check if MariaDB error log exists

cat /var/log/mysql/error.log

No, obviously it doesn‘t exist.


root@DietPi:~# cat /var/log/mysql/error.log
cat: /var/log/mysql/error.log: No such file or directory
root@DietPi:~#

ok it’s not a problem.

Main issue is the missing ib_logfile0 file within /mnt/dietpi_userdata/mysql . Without, MairaDB will not start without.

one last try before using more complex recovery modes. We could try to force initialization of InnoDB files.

systemctl stop mariadb
mv /var/lib/mysql/ibdata1 /var/lib/mysql/ibdata1.bak
systemctl start mariadb
journalctl -u mariadb.service

pls execute commands one by one and not all the same time.

OK, here is the output.


root@DietPi:~# journalctl -u mariadb.service
-- Journal begins at Wed 2025-01-01 17:30:39 CET, ends at Thu 2025-01-02 00:32:31 CET. --
Jan 01 17:30:43 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:30:45 DietPi systemd[979]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:30:45 DietPi systemd[979]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:30:45 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:30:45 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:30:45 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:34:56 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:34:57 DietPi systemd[2326]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:34:57 DietPi systemd[2326]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:34:57 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:34:57 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:34:57 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:53:54 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:53:54 DietPi systemd[4850]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:53:54 DietPi systemd[4850]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:53:54 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:53:54 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:53:54 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:54:32 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:54:32 DietPi systemd[4919]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:54:32 DietPi systemd[4919]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:54:33 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:54:33 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:54:33 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:55:05 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:55:06 DietPi systemd[4988]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:55:06 DietPi systemd[4988]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:55:06 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:55:06 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:55:06 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:55:34 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:55:34 DietPi systemd[5054]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:55:34 DietPi systemd[5054]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:55:34 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:55:34 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:55:34 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:55:50 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:55:51 DietPi systemd[5115]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:55:51 DietPi systemd[5115]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:55:51 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:55:51 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:55:51 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 17:56:04 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 17:56:04 DietPi systemd[5176]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 17:56:04 DietPi systemd[5176]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 17:56:04 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 17:56:04 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 17:56:04 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:35:23 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:35:23 DietPi systemd[6517]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:35:23 DietPi systemd[6517]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:35:24 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:35:24 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:35:24 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:36:10 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:36:10 DietPi systemd[6672]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:36:10 DietPi systemd[6672]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:36:10 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:36:10 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:36:10 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:36:13 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:36:13 DietPi systemd[6752]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:36:13 DietPi systemd[6752]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:36:13 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:36:13 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:36:13 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 18:36:31 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 18:36:32 DietPi systemd[6837]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 18:36:32 DietPi systemd[6837]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 18:36:32 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 18:36:32 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 18:36:32 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 21:21:32 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 21:21:32 DietPi systemd[9616]: mariadb.service: Failed to apply ambient capabilities (before UID change): Operation not supported
Jan 01 21:21:32 DietPi systemd[9616]: mariadb.service: Failed at step CAPABILITIES spawning /usr/sbin/mariadbd: Operation not supported
Jan 01 21:21:32 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=218/CAPABILITIES
Jan 01 21:21:32 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 21:21:32 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 01 21:29:10 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid HymsBUI0mx1wypqx2sSsrnvCias= as process 10475
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: !!! innodb_force_recovery is set to 6 !!!
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Started in read only mode
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Uses event mutexes
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Number of pools: 1
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Using generic crc32 instructions
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Disabling background log and ibuf IO write threads.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Warning] InnoDB: Unable to open "./ib_logfile0" to check native AIO read support.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Warning] InnoDB: Linux Native AIO disabled.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Completed initialization of buffer pool
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] InnoDB: Cannot create log file in read-only mode
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] InnoDB: Plugin initialization aborted with error Read only transaction
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] InnoDB: Starting shutdown...
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [Note] Plugin 'FEEDBACK' is disabled.
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan 01 21:29:11 DietPi mariadbd[10475]: 2025-01-01 21:29:11 0 [ERROR] Aborting
Jan 01 21:29:11 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 01 21:29:11 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 01 21:29:11 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
Jan 02 00:32:06 DietPi systemd[1]: Starting MariaDB 10.5.26 database server...
Jan 02 00:32:06 DietPi mariadbd[13242]: 2025-01-02  0:32:06 0 [Note] Starting MariaDB 10.5.26-MariaDB-0+deb11u2 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid HymsBUI0mx1wypqx2sSsrnvCias= as process 13242
Jan 02 00:32:07 DietPi mariadbd[13242]: 2025-01-02  0:32:07 0 [ERROR] InnoDB: Can't create file './ibdata1' when --innodb-force-recovery is set
Jan 02 00:32:07 DietPi mariadbd[13242]: 2025-01-02  0:32:07 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan 02 00:32:07 DietPi mariadbd[13242]: 2025-01-02  0:32:07 0 [Note] Plugin 'FEEDBACK' is disabled.
Jan 02 00:32:07 DietPi mariadbd[13242]: 2025-01-02  0:32:07 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan 02 00:32:07 DietPi mariadbd[13242]: 2025-01-02  0:32:07 0 [ERROR] Aborting
Jan 02 00:32:07 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 02 00:32:07 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 02 00:32:07 DietPi systemd[1]: Failed to start MariaDB 10.5.26 database server.
root@DietPi:~#

You would need to disable recovery mode.

Btw it’s enough to share the log from last service restarted. You can see it on the timestamp. No need to share everything again.