File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ for i in {1..5}; do
30
30
fi
31
31
done
32
32
33
+ # If password contains commas they must be escaped with a backslash: “exam,ple” according https://docs.percona.com/percona-toolkit/pt-heartbeat.html
34
+ ESCAPED_HEARTBEAT_PASSWORD=" ${HEARTBEAT_PASSWORD// ,/ \\ ,} "
35
+
33
36
HEARTBEAT_USER=' heartbeat'
34
37
echo " [INFO] pt-heartbeat --update --replace --fail-successive-errors 20 --check-read-only --create-table --database sys_operator \
35
38
--table heartbeat --user ${HEARTBEAT_USER} --password XXXX --port ${MYSQL_ADMIN_PORT} "
@@ -43,5 +46,5 @@ pt-heartbeat \
43
46
--database sys_operator \
44
47
--table heartbeat \
45
48
--user " ${HEARTBEAT_USER} " \
46
- --password " ${HEARTBEAT_PASSWORD } " \
49
+ --password " ${ESCAPED_HEARTBEAT_PASSWORD } " \
47
50
--port " ${MYSQL_ADMIN_PORT} "
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ file_env() {
42
42
fi
43
43
export " $var " =" $val "
44
44
unset " $fileVar "
45
- set -o xtrace
46
45
}
47
46
48
47
# usage: process_init_file FILENAME MYSQLCOMMAND...
@@ -294,7 +293,6 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
294
293
MYSQL_ROOT_PASSWORD=" $( pwmake 128) "
295
294
echo " GENERATED ROOT PASSWORD: $MYSQL_ROOT_PASSWORD "
296
295
fi
297
- set -x
298
296
299
297
rootCreate=
300
298
# default root to listen for connections from anywhere
@@ -366,7 +364,6 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
366
364
FLUSH PRIVILEGES ;
367
365
EOSQL
368
366
369
- { set +x; } 2> /dev/null
370
367
if [ -n " $MYSQL_ROOT_PASSWORD " ]; then
371
368
mysql+=(-p" ${MYSQL_ROOT_PASSWORD} " )
372
369
fi
You can’t perform that action at this time.
0 commit comments