package/mariadb: fix permissions of data dir when using systemd
authorRyan Coe <bluemrp9@gmail.com>
Tue, 4 Feb 2020 01:21:53 +0000 (17:21 -0800)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 4 Feb 2020 13:57:20 +0000 (14:57 +0100)
commitadd2c2ba2ec0e3fd18b6f6612dda6ab78ea6affd
treec69fcaf99df6931fb57e2b22bf469a4fea62d289
parent3292f3de499717360cf18d7fecd79ac096216ca8
package/mariadb: fix permissions of data dir when using systemd

mysql_install_db is currently called in the systemd unit without
--user=mysql that the sysv script uses. This will generate the initial
database files with root permissions. However, mysqld runs as user mysql
so this will cause problems. We fix this by calling chown instead of
passing the user parameter because an upcoming version bump will fail when
ran this way.

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/mariadb/mysqld.service