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= ...@@ -25,6 +25,9 @@ echo_n=
echo_c= echo_c=
basedir= basedir=
bindir= bindir=
defaults_file=
defaults_extra_file=
no_defaults=
parse_arg() parse_arg()
{ {
...@@ -47,8 +50,9 @@ parse_arguments() ...@@ -47,8 +50,9 @@ parse_arguments()
do do
case "$arg" in case "$arg" in
--basedir=*) basedir=`parse_arg "$arg"` ;; --basedir=*) basedir=`parse_arg "$arg"` ;;
--no-defaults|--defaults-file=*|--defaults-extra-file=*) --defaults-file=*) defaults_file=`parse_arg "$arg"` ;;
defaults="$arg" ;; --defaults-extra-file=*) defaults_extra_file="$arg" ;;
--no-defaults) no_defaults="$arg" ;;
*) *)
if test -n "$pick_args" if test -n "$pick_args"
then then
...@@ -204,7 +208,7 @@ prepare() { ...@@ -204,7 +208,7 @@ prepare() {
do_query() { do_query() {
echo "$1" >$command echo "$1" >$command
#sed 's,^,> ,' < $command # Debugging #sed 's,^,> ,' < $command # Debugging
$mysql_command --defaults-file=$config <$command $mysql_command --defaults-file=$config $defaults_extra_file $no_defaults $args <$command
return $? return $?
} }
...@@ -235,6 +239,11 @@ make_config() { ...@@ -235,6 +239,11 @@ make_config() {
esc_pass=`basic_single_escape "$rootpass"` esc_pass=`basic_single_escape "$rootpass"`
echo "password='$esc_pass'" >>$config echo "password='$esc_pass'" >>$config
#sed 's,^,> ,' < $config # Debugging #sed 's,^,> ,' < $config # Debugging
if test -n "$defaults_file"
then
cat "$defaults_file" >>$config
fi
} }
get_root_password() { 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