summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-07-25 12:21:51 +0200
committerSergei Golubchik <serg@mariadb.org>2015-07-27 10:52:21 +0200
commitcd0813e33ee41a88e01523bd1c255375b2aeae9a (patch)
treee7262732486c49a988e549c09d3edca5a012133f /scripts
parent39f5234a6ddf35ecc88a370414df30a9b60ad3c2 (diff)
downloadmariadb-git-cd0813e33ee41a88e01523bd1c255375b2aeae9a.tar.gz
MDEV-8534 [PATCH] mysql_secure_installation doesn't pass "socket" to "mysql"
fix the previous patch to pass defaults-file to parse_arguments
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_secure_installation.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh
index 270ee7734c7..d91e31cda48 100644
--- a/scripts/mysql_secure_installation.sh
+++ b/scripts/mysql_secure_installation.sh
@@ -50,7 +50,7 @@ parse_arguments()
do
case "$arg" in
--basedir=*) basedir=`parse_arg "$arg"` ;;
- --defaults-file=*) defaults_file=`parse_arg "$arg"` ;;
+ --defaults-file=*) defaults_file="$arg" ;;
--defaults-extra-file=*) defaults_extra_file="$arg" ;;
--no-defaults) no_defaults="$arg" ;;
*)
@@ -171,7 +171,7 @@ fi
# Now we can get arguments from the group [client] and [client-server]
# in the my.cfg file, then re-run to merge with command line arguments.
-parse_arguments `$print_defaults $defaults client client-server client-mariadb`
+parse_arguments `$print_defaults $defaults_file $defaults_extra_file $no_defaults client client-server client-mariadb`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
# Configure paths to support files
@@ -232,6 +232,10 @@ basic_single_escape () {
echo "$1" | sed 's/\(['"'"'\]\)/\\\1/g'
}
+#
+# create a simple my.cnf file to be able to pass the root password to the mysql
+# client without putting it on the command line
+#
make_config() {
echo "# mysql_secure_installation config file" >$config
echo "[mysql]" >>$config
@@ -242,7 +246,8 @@ make_config() {
if test -n "$defaults_file"
then
- cat "$defaults_file" >>$config
+ dfile=`parse_arg "$defaults_file"`
+ cat "$dfile" >>$config
fi
}