Small fix for PXC for IP address

This commit is contained in:
Tomislav Plavcic
2017-03-21 15:36:55 +01:00
parent 1fa01d783d
commit aca9567aa2

View File

@@ -248,7 +248,7 @@ APP="${FORK:-"mysql"}"
if [ $type = "cluster" -o $APP = "pxc" ]; then
# disabled for now because used perl module is not available everywhere and in some distros it returns ipv6 address
# ip=$(perl -MNet::Address::IP::Local -le 'print Net::Address::IP::Local->public')
ip=$(hostname -i)
ip=$(hostname -i | cut -d" " -f2)
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V --query_cache_size=0 --query_cache_type=0 --bind-address $ip 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
else
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;