fix: add missing db init script

This commit is contained in:
Urko. 2023-12-24 21:00:15 +01:00
parent da8129fa56
commit 09576499be
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/bin/bash
# Wait for the database server to start
# (Adjust the waiting logic as per your requirement)
sleep 10
# Granting privileges to cloud_user (adjust as necessary)
mysql -u root -p"${MYSQL_ROOT_PASSWORD}" -e "
GRANT ALL PRIVILEGES ON ${MYSQL_DATABASE}.* TO '${MYSQL_USER}'@'%';
FLUSH PRIVILEGES;
"