aboutsummaryrefslogtreecommitdiff
path: root/srcs/mysql/src/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/mysql/src/entrypoint.sh')
-rwxr-xr-xsrcs/mysql/src/entrypoint.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/srcs/mysql/src/entrypoint.sh b/srcs/mysql/src/entrypoint.sh
new file mode 100755
index 0000000..af327f7
--- /dev/null
+++ b/srcs/mysql/src/entrypoint.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# addgroup mysql mysql
+#
+# MYSQLD_DIR=/run/mysqld
+#
+# mkdir $MYSQLD_DIR
+# chown mysql:mysql $MYSQL_DIR
+
+mysql -u root --skip-password <<EOF
+CREATE DATABASE wordpressdb;
+CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'wordpresspass';
+GRANT ALL PRIVILEGES ON wordpressdb.* TO 'wordpressuser'@'localhost';
+IDENTIFIED BY 'wordpresspass';
+FLUSH PRIVILEGES;
+EOF
+
+mysql