1.
Код: Выделить всё
mkdir -p /etc/systemd/system/mariadb.service.d/Код: Выделить всё
cat >> /etc/systemd/system/mariadb.service.d/unset_env_var_empty_fix.conf<< EOF
# This file will be parsed after the file /usr/lib/systemd/system/mariadb.service itself is parsed.
# What does this file do and what issue does this addresses?:
# Without this file, running the command
# \`sudo systemctl status mariadb.service\`
# produces the following message in it's output:
#
# "May 13 15:06:55 my.fqdn.server (mysqld)[208279]: mariadb.service: Referenced but unset
# environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER"
# The original issue was posted at:
# https://serverfault.com/questions/1178303/mariadb-on-ubuntu-24-04-server-referenced-but-unset-environment-variable-evalu
# You can find the direct answer to mitigating this issue here:
# https://serverfault.com/a/1193469/487106
# Do not edit this file unless you want "mariadb.service: Referenced but unset environment
# variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER" to
# reappear when running the command
# \`sudo systemctl status mariadb.service\`.
[Service]
Environment="MYSQLD_OPTS="
Environment="_WSREP_NEW_CLUSTER="
EOFКод: Выделить всё
systemctl daemon-reload