mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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 "$@"
|
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
|
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
|
if test ! -x $ledir/$MYSQLD
|
||||||
then
|
then
|
||||||
echo "The file $ledir/$MYSQLD doesn't exist or is not executable"
|
echo "The file $ledir/$MYSQLD doesn't exist or is not executable"
|
||||||
|
Reference in New Issue
Block a user