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

Override time-zone option when initializing database #677

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: 2 additions & 2 deletions percona-server-5.6/ps-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then

echo 'Initializing database'
# "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here)
mysql_install_db --datadir="$DATADIR" --rpm --keep-my-cnf "${@:2}"
mysql_install_db --datadir="$DATADIR" --rpm --keep-my-cnf "${@:2}" --default-time-zone=SYSTEM
echo 'Database initialized'

SOCKET="$(_get_config 'socket' "$@")"
"$@" --skip-networking --socket="${SOCKET}" &
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" &
pid="$!"

mysql=( mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" )
Expand Down
4 changes: 2 additions & 2 deletions percona-server-5.7/ps-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
mkdir -p "$DATADIR"

echo 'Initializing database'
"$@" --initialize-insecure --skip-ssl
"$@" --initialize-insecure --skip-ssl --default-time-zone=SYSTEM
echo 'Database initialized'

if command -v mysql_ssl_rsa_setup > /dev/null && [ ! -e "$DATADIR/server-key.pem" ]; then
Expand All @@ -114,7 +114,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
fi

SOCKET="$(_get_config 'socket' "$@")"
"$@" --skip-networking --socket="${SOCKET}" &
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" &
pid="$!"

mysql=( mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" --password="" )
Expand Down
4 changes: 2 additions & 2 deletions percona-server-8.0/ps-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
mkdir -p "$DATADIR"

echo 'Initializing database'
"$@" --initialize-insecure
"$@" --initialize-insecure --default-time-zone=SYSTEM
echo 'Database initialized'

if command -v mysql_ssl_rsa_setup > /dev/null && [ ! -e "$DATADIR/server-key.pem" ]; then
Expand All @@ -114,7 +114,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
fi

SOCKET="$(_get_config 'socket' "$@")"
"$@" --skip-networking --socket="${SOCKET}" &
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" &
pid="$!"

mysql=( mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" --password="" )
Expand Down