Commit f0112142 authored by unknown's avatar unknown

scripts/mysqld_safe.sh

    Only add --defaults-extra-file=$DATADIR/my.cnf if $DATADIR/my.cnf is readable.


scripts/mysqld_safe.sh:
  Only add --defaults-extra-file=$DATADIR/my.cnf if $DATADIR/my.cnf is readable.
  Without this patch, running mysqld_safe gives:
  
  Could not open required defaults file: /opt/home/tim/m/50/m/data/my.cnf
  Fatal error in defaults handling. Program aborted
  Could not open required defaults file: /opt/home/tim/m/50/m/data/my.cnf
  Fatal error in defaults handling. Program aborted
  
  These errors are printed by my_print_defaults; mysqld also encounters the
  same problem and quits.
parent 6a7dedf2
...@@ -114,7 +114,7 @@ then ...@@ -114,7 +114,7 @@ then
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
DATADIR=$MY_BASEDIR_VERSION/data DATADIR=$MY_BASEDIR_VERSION/data
if test -z "$defaults" if test -z "$defaults" -a -r "$DATADIR/my.cnf"
then then
defaults="--defaults-extra-file=$DATADIR/my.cnf" defaults="--defaults-extra-file=$DATADIR/my.cnf"
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment