kumquat-buildroot/package/mariadb/mysqld.service
Ryan Coe 2b653736ce package/mariadb: explicitly define logging directory to mysqld
By default, mariadb creates logging files under the data directory.
This patch updates the startup scripts to log under /var/log/mysql.

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-02-04 14:57:20 +01:00

15 lines
468 B
Desktop File

[Unit]
Description=MySQL database server
[Service]
ExecStartPre=/bin/sh -c 'test "`ls -1 /var/lib/mysql | wc -l`" != "0" || mysql_install_db --basedir=/usr --datadir=/var/lib/mysql && chown -R mysql:mysql /var/lib/mysql'
ExecStartPre=install -d -o mysql -g root -m 0755 /var/log/mysql
ExecStart=/usr/bin/mysqld_safe --log-error=/var/log/mysql/mysqld.log
Restart=always
User=mysql
RuntimeDirectory=mysql
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target