gitlab-org--gitlab-foss/scripts/create_mysql_user.sh
Stan Hu ad88e3f88d Fix rake db:seed_fu not doing anything in CI
The default behavior of seed_fu is to load the fixtures using the RAILS_ENV
environment.  In CI, since we set RAILS_ENV=test, nothing is ever
loaded. Instead of `rake db:seed_fu`, use `rake gitlab:setup`, which sets up
MySQL properly with limits.

Closes #41517
2018-01-02 12:44:51 -08:00

8 lines
271 B
Bash

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