summaryrefslogtreecommitdiff
path: root/scripts/mysql_install_db.sh
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-04-17 14:53:30 +0200
committerSergei Golubchik <serg@mariadb.org>2019-04-24 16:06:54 +0200
commit3db6de33b2b47a3c31bc8f8deb721abe0c5b0e1c (patch)
tree335035a147364001b85c674ec542f2ca5dab84b1 /scripts/mysql_install_db.sh
parent17088dd941b6c759e294cc3a9767574b19734694 (diff)
downloadmariadb-git-3db6de33b2b47a3c31bc8f8deb721abe0c5b0e1c.tar.gz
MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database
create mysql and test databases with SQL, not mkdir.
Diffstat (limited to 'scripts/mysql_install_db.sh')
-rw-r--r--scripts/mysql_install_db.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 5fa2c4c0e04..43b7d7a52f6 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -35,7 +35,9 @@ force=0
in_rpm=0
ip_only=0
cross_bootstrap=0
-install_params=""
+install_params="create database if not exists mysql;
+create database if not exists test;
+use mysql;"
auth_root_authentication_method=normal
auth_root_socket_user='root'
@@ -431,7 +433,7 @@ then
fi
# Create database directories
-for dir in "$ldata" "$ldata/mysql" "$ldata/test"
+for dir in "$ldata"
do
if test ! -d "$dir"
then
@@ -493,7 +495,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 "$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
then
s_echo "OK"
else