Commit 4d2d0eb5 authored by unknown's avatar unknown

- Added option "--skip-name-resolve" to mysql_install_db to be able to

   use the local machine's IP address instead of the host name when 
   building the initial grant tables if "skip-name-resolve" has been
   specified in my.cnf. This can be helpful on FreeBSD to avoid
   thread-safety problems with the FreeBSD resolver libraries.
   (Thanks to Jeremy Zawodny for the patch)


scripts/mysql_install_db.sh:
   - Added option "--skip-name-resolve" to use the local machine's IP address
     instead of the host name when building the initial grant tables if
     "skip-name-resolve" has been specified in my.cnf (Thanks to Jeremy 
     Zawodny for the patch)
parent 6d371797
......@@ -37,6 +37,7 @@ parse_arguments() {
--basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--skip-name-resolve) ip_only=1 ;;
*)
if test -n "$pick_args"
then
......@@ -135,6 +136,12 @@ then
fi
fi
if test "$ip_only" -eq 1
then
ip=`echo "$resolved" | awk '/ /{print $6}'`
hostname=$ip
fi
# Create database directories mysql & test
if test ! -d $ldata; then mkdir $ldata; chmod 700 $ldata ; fi
if test ! -d $ldata/mysql; then mkdir $ldata/mysql; chmod 700 $ldata/mysql ; 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