gitlab-org--gitlab-foss/scripts/create_mysql_user.sh
Lin Jen-Shin 0ab6469187 Grant privileges after database is created
Never drop the database when granting privileges
2018-05-16 21:52:08 +08:00

7 lines
169 B
Bash

#!/bin/bash
mysql --user=root --host=mysql <<EOF
CREATE USER IF NOT EXISTS 'gitlab'@'%';
GRANT ALL PRIVILEGES ON gitlabhq_test.* TO 'gitlab'@'%';
FLUSH PRIVILEGES;
EOF