329
Comment:
|
1382
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
* Only first run, then startup leaves flag '''.user_scripts_initialized''' * dirs {{{ export BITNAMI_VOLUME_DIR="/bitnami" export DB_VOLUME_DIR="${BITNAMI_VOLUME_DIR}/mariadb" export DB_DATA_DIR="${DB_VOLUME_DIR}/data" #= /bitnami/mariadb/data }}} * *.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
dirs
export BITNAMI_VOLUME_DIR="/bitnami" export DB_VOLUME_DIR="${BITNAMI_VOLUME_DIR}/mariadb" export DB_DATA_DIR="${DB_VOLUME_DIR}/data" #= /bitnami/mariadb/data
*.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