summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-03-02 12:19:44 -0800
committerjimw@mysql.com <>2005-03-02 12:19:44 -0800
commitbb9d7bfc792b8496641ee633875266e65cdc1c58 (patch)
tree89f1a96e46b432e2a171b78990f9b8835d30c829 /scripts/mysqld_safe.sh
parent89d44e039e202e18fd4f272eeefdcb5336397498 (diff)
downloadmariadb-git-bb9d7bfc792b8496641ee633875266e65cdc1c58.tar.gz
Create directory for UNIX socket in mysqld_safe if it doesn't already exist.
(Bug #8513)
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index f6b0169d230..308db270828 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -150,6 +150,15 @@ parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysq
parse_arguments PICK-ARGS-FROM-ARGV "$@"
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
+# Make sure that directory for $safe_mysql_unix_port exists
+mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
+if [ ! -d $mysql_unix_port_dir ]
+then
+ mkdir $mysql_unix_port_dir
+ chown $user $mysql_unix_port_dir
+fi
+
+
if test ! -x $ledir/$MYSQLD
then
echo "The file $ledir/$MYSQLD doesn't exist or is not executable"