321
Comment:
|
1182
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
* Using startup feature, that looks for db/scripts in /docker-entrypoint-initdb.d/ and loads then on db creation. | * Using startup feature, that looks for db/scripts in '''"/docker-entrypoint-initdb.d/"''' and loads then on db creation. * Only first run, then startup leaves flag '''.user_scripts_initialized''' * *.sql.gz imported with {{{ *.sql.gz) [[ "$DB_REPLICATION_MODE" = "slave" ]] \ && warn "Custom SQL $1db is not supported on slave nodes, ignoring $f" && continue wait_for_mysql_access "$DB_ROOT_USER" # In this case, it is best to pipe the uncompressed SQL commands directly # to the 'mysql' command as extraction may cause problems # e.g. lack of disk space, permission issues... if ! gunzip -c "$f" | mysql_execute_print_output "$DB_DATABASE" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD"; then error "Failed executing $f" return 1 fi }}} |
k8s/MariaDbGaleraInitDb
Running MariaDb (mysql fork) clusters version (Galera) using helm in Kubernetes, then initializing DB.
- 2022 - Using the bitnami/Mariadb-galera helm chart to deploy
Using startup feature, that looks for db/scripts in "/docker-entrypoint-initdb.d/" and loads then on db creation.
Only first run, then startup leaves flag .user_scripts_initialized
*.sql.gz imported with
*.sql.gz) [[ "$DB_REPLICATION_MODE" = "slave" ]] \ && warn "Custom SQL $1db is not supported on slave nodes, ignoring $f" && continue wait_for_mysql_access "$DB_ROOT_USER" # In this case, it is best to pipe the uncompressed SQL commands directly # to the 'mysql' command as extraction may cause problems # e.g. lack of disk space, permission issues... if ! gunzip -c "$f" | mysql_execute_print_output "$DB_DATABASE" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD"; then error "Failed executing $f" return 1 fi