summaryrefslogtreecommitdiff
path: root/scripts/mysql_install_db.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mysql_install_db.sh')
-rw-r--r--scripts/mysql_install_db.sh63
1 files changed, 26 insertions, 37 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 0bbac8ba8c4..959923f3407 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -30,6 +30,7 @@ defaults=""
defaults_group_suffix=""
mysqld_opt=""
user=""
+silent_startup="--silent-startup"
force=0
in_rpm=0
@@ -145,7 +146,7 @@ parse_arguments()
# where a chown of datadir won't help)
user=`parse_arg "$arg"` ;;
--skip-name-resolve) ip_only=1 ;;
- --verbose) verbose=1 ;; # Obsolete
+ --verbose) verbose=1 ; silent_startup="" ;;
--rpm) in_rpm=1 ;;
--help) usage ;;
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
@@ -311,6 +312,7 @@ then
langdir="$basedir/sql/share/english"
srcpkgdatadir="$srcdir/scripts"
buildpkgdatadir="$builddir/scripts"
+ plugindir="$builddir/plugin/auth_socket"
elif test -n "$basedir"
then
bindir="$basedir/bin" # only used in the help text
@@ -339,6 +341,7 @@ then
cannot_find_file fill_help_tables.sql @pkgdata_locations@
exit 1
fi
+ plugindir=`find_in_dirs --dir auth_socket.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin`
else
basedir="@prefix@"
bindir="@bindir@"
@@ -346,6 +349,7 @@ else
mysqld="@sbindir@/mysqld"
srcpkgdatadir="@pkgdatadir@"
buildpkgdatadir="@pkgdatadir@"
+ plugindir="@pkgplugindir@"
fi
# Set up paths to SQL scripts required for bootstrap
@@ -462,8 +466,9 @@ fi
mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
mysqld_install_cmd_line()
{
- "$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap \
+ "$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silent_startup\
"--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" \
+ "--plugin-dir=${plugindir}" \
$args --max_allowed_packet=8M \
--net_buffer_length=16K
}
@@ -481,7 +486,7 @@ SET @auth_root_socket=NULL;" ;;
SET @skip_auth_root_nopasswd=1;
SET @auth_root_socket='$auth_root_socket_user';" ;;
esac
-if { echo "use mysql;$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
+if { echo "use mysql;$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables" "$fill_help_tables" "$maria_add_gis_sp"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
then
s_echo "OK"
else
@@ -516,27 +521,6 @@ else
exit 1
fi
-s_echo "Filling help tables..."
-if { echo "use mysql;"; cat "$fill_help_tables"; } | mysqld_install_cmd_line > /dev/null
-then
- s_echo "OK"
-else
- echo
- echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
- echo "The \"HELP\" command might not work properly."
-fi
-
-s_echo "Creating OpenGIS required SP-s..."
-if { echo "use mysql;"; cat "$maria_add_gis_sp"; } | mysqld_install_cmd_line > /dev/null
-then
- s_echo "OK"
-else
- echo
- echo "WARNING: OPENGIS REQUIRED SP-S WERE NOT COMPLETELY INSTALLED!"
- echo "GIS extentions might not work properly."
-fi
-
-
# Don't output verbose information if running inside bootstrap or using
# --srcdir for testing. In such cases, there's no end user looking at
# the screen.
@@ -546,19 +530,24 @@ then
s_echo "To start mysqld at boot time you have to copy"
s_echo "support-files/mysql.server to the right place for your system"
- echo
- echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !"
- echo "To do so, start the server, then issue the following commands:"
- echo
- echo "'$bindir/mysqladmin' -u root password 'new-password'"
- echo "'$bindir/mysqladmin' -u root -h $hostname password 'new-password'"
- echo
- echo "Alternatively you can run:"
- echo "'$bindir/mysql_secure_installation'"
- echo
- echo "which will also give you the option of removing the test"
- echo "databases and anonymous user created by default. This is"
- echo "strongly recommended for production servers."
+ if test "$auth_root_authentication_method" = normal
+ then
+ echo
+ echo
+ echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !"
+ echo "To do so, start the server, then issue the following commands:"
+ echo
+ echo "'$bindir/mysqladmin' -u root password 'new-password'"
+ echo "'$bindir/mysqladmin' -u root -h $hostname password 'new-password'"
+ echo
+ echo "Alternatively you can run:"
+ echo "'$bindir/mysql_secure_installation'"
+ echo
+ echo "which will also give you the option of removing the test"
+ echo "databases and anonymous user created by default. This is"
+ echo "strongly recommended for production servers."
+ fi
+
echo
echo "See the MariaDB Knowledgebase at http://mariadb.com/kb or the"
echo "MySQL manual for more instructions."