summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <lenz@mysql.com>2003-09-10 17:48:43 +0200
committerunknown <lenz@mysql.com>2003-09-10 17:48:43 +0200
commit4d2d0eb5d8b39c3d892b3ca365497aa4a16115e1 (patch)
treedc419df101ecab14d36829bb990da92549465f49 /scripts
parent6d3717979666b4410524724d2b3b2bd81589a92e (diff)
downloadmariadb-git-4d2d0eb5d8b39c3d892b3ca365497aa4a16115e1.tar.gz
- 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)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 920bd27cc88..0e685ba38e4 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -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