1 2 3 4 5 6 7
#!/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