summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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"