diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-07-25 12:17:10 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-07-27 10:52:21 +0200 |
commit | 39f5234a6ddf35ecc88a370414df30a9b60ad3c2 (patch) | |
tree | d628326d6396382f90f602e99fe85528150b31f8 /scripts | |
parent | 517ef2bd39a0d89fc4a99201d5f97ceea1766397 (diff) | |
download | mariadb-git-39f5234a6ddf35ecc88a370414df30a9b60ad3c2.tar.gz |
MDEV-8534 [PATCH] mysql_secure_installation doesn't pass "socket" to "mysql"
backport https://github.com/MariaDB/server/pull/88 to 10.0
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_secure_installation.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index 8eca327028e..270ee7734c7 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -25,6 +25,9 @@ echo_n= echo_c= basedir= bindir= +defaults_file= +defaults_extra_file= +no_defaults= parse_arg() { @@ -47,8 +50,9 @@ parse_arguments() do case "$arg" in --basedir=*) basedir=`parse_arg "$arg"` ;; - --no-defaults|--defaults-file=*|--defaults-extra-file=*) - defaults="$arg" ;; + --defaults-file=*) defaults_file=`parse_arg "$arg"` ;; + --defaults-extra-file=*) defaults_extra_file="$arg" ;; + --no-defaults) no_defaults="$arg" ;; *) if test -n "$pick_args" then @@ -204,7 +208,7 @@ prepare() { do_query() { echo "$1" >$command #sed 's,^,> ,' < $command # Debugging - $mysql_command --defaults-file=$config <$command + $mysql_command --defaults-file=$config $defaults_extra_file $no_defaults $args <$command return $? } @@ -235,6 +239,11 @@ make_config() { esc_pass=`basic_single_escape "$rootpass"` echo "password='$esc_pass'" >>$config #sed 's,^,> ,' < $config # Debugging + + if test -n "$defaults_file" + then + cat "$defaults_file" >>$config + fi } get_root_password() { |