mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Docker: create missing 'aurweb' DB if needed
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
61c473405f
commit
d95e4ec443
1 changed files with 7 additions and 0 deletions
|
@ -8,9 +8,16 @@ done
|
||||||
# Create test database.
|
# Create test database.
|
||||||
mysql -u root -e "CREATE USER 'aur'@'%' IDENTIFIED BY 'aur'" \
|
mysql -u root -e "CREATE USER 'aur'@'%' IDENTIFIED BY 'aur'" \
|
||||||
2>/dev/null || /bin/true
|
2>/dev/null || /bin/true
|
||||||
|
|
||||||
|
# Create a brand new 'aurweb_test' DB.
|
||||||
mysql -u root -e "DROP DATABASE aurweb_test" 2>/dev/null || /bin/true
|
mysql -u root -e "DROP DATABASE aurweb_test" 2>/dev/null || /bin/true
|
||||||
mysql -u root -e "CREATE DATABASE aurweb_test"
|
mysql -u root -e "CREATE DATABASE aurweb_test"
|
||||||
mysql -u root -e "GRANT ALL PRIVILEGES ON aurweb_test.* TO 'aur'@'%'"
|
mysql -u root -e "GRANT ALL PRIVILEGES ON aurweb_test.* TO 'aur'@'%'"
|
||||||
|
|
||||||
|
# Create the 'aurweb' DB if it does not yet exist.
|
||||||
|
mysql -u root -e "CREATE DATABASE aurweb" 2>/dev/null || /bin/true
|
||||||
|
mysql -u root -e "GRANT ALL PRIVILEGES ON aurweb.* TO 'aur'@'%'"
|
||||||
|
|
||||||
mysql -u root -e "FLUSH PRIVILEGES"
|
mysql -u root -e "FLUSH PRIVILEGES"
|
||||||
|
|
||||||
# Shutdown mariadb.
|
# Shutdown mariadb.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue