Blame tests/p_mysql/mysqld_conn_test.sh

Karanbir Singh 0b5bb2
#!/bin/sh
Karanbir Singh 0b5bb2
# Author: Athmane Madjoudj <athmanem@gmail.com>
Karanbir Singh 0b5bb2
Karanbir Singh 0b5bb2
# FIXME: Test is very basic
Karanbir Singh 0b5bb2
echo -n "MySQL is listening test:  "
Karanbir Singh 0b5bb2
nc -w 1 localhost 3306  > /dev/null 2>&1
Karanbir Singh 0b5bb2
if [ $? -eq 0 ]; then
Karanbir Singh 0b5bb2
	echo 'PASS'
Karanbir Singh 0b5bb2
else
Karanbir Singh 0b5bb2
	echo 'FAIL'
Karanbir Singh 0b5bb2
    exit 1
Karanbir Singh 0b5bb2
fi
Karanbir Singh 0b5bb2
Karanbir Singh 0b5bb2
# kb: Can we do something like :
Karanbir Singh 0b5bb2
#     hn=$(mysql -N -B -u root -e "show variables like 'hostname'" | cut -f 2)
Karanbir Singh 0b5bb2
# then compare ${hn} to the real machine hostname ( `fqdn` ? ) to make sure
Karanbir Singh 0b5bb2
# they are identical