use of mysql ping to detect database host failure