summaryrefslogtreecommitdiff
path: root/scripts/create_mysql_user.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/create_mysql_user.sh')
-rw-r--r--scripts/create_mysql_user.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/create_mysql_user.sh b/scripts/create_mysql_user.sh
new file mode 100644
index 00000000000..28f6cfb50ae
--- /dev/null
+++ b/scripts/create_mysql_user.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+mysql --user=root --host=mysql <<EOF
+CREATE DATABASE IF NOT EXISTS gitlabhq_test;
+CREATE USER IF NOT EXISTS 'gitlab'@'%';
+GRANT ALL PRIVILEGES ON gitlabhq_test.* TO 'gitlab'@'%';
+FLUSH PRIVILEGES;
+EOF