#!/bin/bash
host=127.0.0.1
user=admin
password='xx'
port=6032
x=0
check_proxy()
{
v=$(mysql -N -u$user -p$password -P6032 -h $host -e "select 1")
if [ $? -eq 0 ];then
echo ok
break
else
#echo $x
x=$(($x+1))
if [ $x -gt "3" ];then
echo "no"
#/usr/bin/python /usr/local/scriipt/proxysql_warm.py
break
else
check_proxy
fi
fi
}
check_proxy