MySQL failover/failback script