mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Create directory for UNIX socket in mysqld_safe if it doesn't already exist.
(Bug #8513) scripts/mysqld_safe.sh: Create directory for UNIX socket if it doesn't exist
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user