From 09576499be66d314e04a1dc05122e02d853a6e18 Mon Sep 17 00:00:00 2001 From: "Urko." Date: Sun, 24 Dec 2023 21:00:15 +0100 Subject: [PATCH] fix: add missing db init script --- mariadb-init.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mariadb-init.sh b/mariadb-init.sh index e69de29..9d194d5 100644 --- a/mariadb-init.sh +++ b/mariadb-init.sh @@ -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; +"