ninedocker/services/15-mariadb/volume/nine/init.sh

3 lines
190 B
Bash
Executable File

#!/bin/bash
mariadb -u root -p$MARIADB_ROOT_PASSWORD -e "CREATE DATABASE IF NOT EXISTS $1;"
mariadb -u root -p$MARIADB_ROOT_PASSWORD -e "GRANT ALL PRIVILEGES ON $1.* TO '$MARIADB_USER'@'%';"