summaryrefslogtreecommitdiff
path: root/user/mariadb/mariadb-server.pre-install
diff options
context:
space:
mode:
Diffstat (limited to 'user/mariadb/mariadb-server.pre-install')
-rw-r--r--user/mariadb/mariadb-server.pre-install7
1 files changed, 7 insertions, 0 deletions
diff --git a/user/mariadb/mariadb-server.pre-install b/user/mariadb/mariadb-server.pre-install
new file mode 100644
index 000000000..de2bcd795
--- /dev/null
+++ b/user/mariadb/mariadb-server.pre-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+groupadd -g 60 -r mysql
+useradd -M -N -r -u 60 -g 60 -c "MariaDB Database User" -d /var/lib/mysql -s /sbin/nologin mysql
+
+mkdir /var/lib/mysql
+chown mysql:mysql /var/lib/mysql