#!/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; "