mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge branch '10.7' into 10.8
This commit is contained in:
@@ -31,6 +31,7 @@ defaults=""
|
||||
defaults_group_suffix=""
|
||||
mysqld_opt=""
|
||||
user=""
|
||||
group=""
|
||||
silent_startup="--silent-startup"
|
||||
|
||||
force=0
|
||||
@@ -96,6 +97,11 @@ Usage: $0 [OPTIONS]
|
||||
user. You must be root to use this option. By default
|
||||
mysqld runs using your current login name and files and
|
||||
directories that it creates will be owned by you.
|
||||
--group=group_name The login group to use for running mysqld. Files and
|
||||
directories created by mysqld will be owned by this
|
||||
group. You must be root to use this option. By default
|
||||
mysqld runs using your current group and files and
|
||||
directories that it creates will be owned by you.
|
||||
--extra-file=file Add user defined SQL file, to be executed following
|
||||
regular database initialization.
|
||||
|
||||
@@ -147,11 +153,11 @@ parse_arguments()
|
||||
--ldata=*|--datadir=*|--data=*) ldata=`parse_arg "$arg"` ;;
|
||||
--log-error=*)
|
||||
log_error=`parse_arg "$arg"` ;;
|
||||
--user=*)
|
||||
# Note that the user will be passed to mysqld so that it runs
|
||||
# as 'user' (crucial e.g. if log-bin=/some_other_path/
|
||||
# where a chown of datadir won't help)
|
||||
user=`parse_arg "$arg"` ;;
|
||||
--user=*) user=`parse_arg "$arg"` ;;
|
||||
--group=*) group=`parse_arg "$arg"` ;;
|
||||
--skip-name-resolve) ip_only=1 ;;
|
||||
--verbose) verbose=1 ; silent_startup="" ;;
|
||||
--rpm) in_rpm=1 ;;
|
||||
@@ -480,7 +486,12 @@ do
|
||||
fi
|
||||
if test -n "$user"
|
||||
then
|
||||
chown $user "$dir"
|
||||
if test -z "$group"
|
||||
then
|
||||
chown $user $dir
|
||||
else
|
||||
chown $user:$group $dir
|
||||
fi
|
||||
if test $? -ne 0
|
||||
then
|
||||
echo "Cannot change ownership of the database directories to the '$user'"
|
||||
@@ -514,6 +525,11 @@ then
|
||||
args="$args --user=$user"
|
||||
fi
|
||||
|
||||
if test -n "$group"
|
||||
then
|
||||
args="$args --group=$group"
|
||||
fi
|
||||
|
||||
if test -f "$ldata/mysql/user.frm"
|
||||
then
|
||||
echo "mysql.user table already exists!"
|
||||
@@ -537,7 +553,7 @@ mysqld_install_cmd_line()
|
||||
{
|
||||
"$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silent_startup\
|
||||
"--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" \
|
||||
"--plugin-dir=${plugindir}" \
|
||||
"--plugin-dir=${plugindir}" --loose-disable-plugin-file-key-management \
|
||||
$args --max_allowed_packet=8M \
|
||||
--net_buffer_length=16K
|
||||
}
|
||||
@@ -578,6 +594,7 @@ cat_sql()
|
||||
s_echo "Installing MariaDB/MySQL system tables in '$ldata' ..."
|
||||
if cat_sql | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
|
||||
then
|
||||
printf "@VERSION@-MariaDB" > "$ldata/mysql_upgrade_info"
|
||||
s_echo "OK"
|
||||
else
|
||||
log_file_place=$ldata
|
||||
|
Reference in New Issue
Block a user