Commit 39f5234a authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-8534 [PATCH] mysql_secure_installation doesn't pass "socket" to "mysql"

backport https://github.com/MariaDB/server/pull/88 to 10.0
parent 517ef2bd
......@@ -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() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment