Skip to content

Commit fb8bc59

Browse files
committed
mysqld_safe: don't use "$DATADIR/my.cnf"
finally removed, after being deprecated since 2005
1 parent 7fc36e6 commit fb8bc59

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

scripts/mysqld_safe.sh

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,6 @@ fi
550550
if test -d $MY_BASEDIR_VERSION/data/mysql
551551
then
552552
DATADIR=$MY_BASEDIR_VERSION/data
553-
if test -z "$defaults" -a -r "$DATADIR/my.cnf"
554-
then
555-
defaults="--defaults-extra-file=$DATADIR/my.cnf"
556-
fi
557553
# Next try where the source installs put it
558554
elif test -d $MY_BASEDIR_VERSION/var/mysql
559555
then
@@ -565,23 +561,13 @@ fi
565561

566562
if test -z "$MYSQL_HOME"
567563
then
568-
if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf"
569-
then
570-
log_error "WARNING: Found two instances of my.cnf -
571-
$MY_BASEDIR_VERSION/my.cnf and
572-
$DATADIR/my.cnf
573-
IGNORING $DATADIR/my.cnf"
574-
575-
MYSQL_HOME=$MY_BASEDIR_VERSION
576-
elif test -r "$DATADIR/my.cnf"
564+
if test -r "$DATADIR/my.cnf"
577565
then
578566
log_error "WARNING: Found $DATADIR/my.cnf
579-
The data directory is a deprecated location for my.cnf, please move it to
567+
The data directory is not a valid location for my.cnf, please move it to
580568
$MY_BASEDIR_VERSION/my.cnf"
581-
MYSQL_HOME=$DATADIR
582-
else
583-
MYSQL_HOME=$MY_BASEDIR_VERSION
584569
fi
570+
MYSQL_HOME=$MY_BASEDIR_VERSION
585571
fi
586572
export MYSQL_HOME
587573

0 commit comments

Comments
 (0)