Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an ENV var to be set to an additional - optional - directory fo… #625

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions percona-server-5.7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Set to `1` to allow the container to be started with enabled ROCKSDB engine.

Set to `1` will skip starting the `mysqld` process and will run only the initialization part if MySQL was not initialized before.

## `MYSQL_INIT_DB`

Set to directory where initialization files reside. This is an additional directory for initialzation, on top of the default directory, /docker-entrypoint-initdb.d

# Notes, Tips, Gotchas

## Secure Container Startup
Expand Down
5 changes: 5 additions & 0 deletions percona-server-5.7/ps-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
process_init_file "$f" "${mysql[@]}"
done

ls $MYSQL_INIT_DIR > /dev/null
for f in ${MYSQL_INIT_DIR}/*; do
process_init_file "$f" "${mysql[@]}"
done

if [ ! -z "$MYSQL_ONETIME_PASSWORD" ]; then
"${mysql[@]}" <<-EOSQL
ALTER USER 'root'@'%' PASSWORD EXPIRE;
Expand Down