if [ $SLAVE_IO_S == "Yes" ]&&[ $SLAVE_SQL_S == "Yes" ];then
echo "the mysql-master-slave-status is ok"
else
echo "the mysql-master-slave-status is failed"
if [ ! -d /tmp/$date1 ];then
mkdir -p /tmp/$date1
fi
mysql -uroot -p123456 -e "show slave status \G;" >/tmp/$date1/mysql-master-slave-status.txt
sendEmail -f zhang_peicheng@163.com -t 756475064@qq.com -s smtp.163.com -u "mysql_status" -xu zhang_peicheng -xp xxxxxxxxxxxxx -m "the mysql-master-slave status is failed" -a /tmp/$date1/mysql-master-slave-status.txt
fi