reestablish lost mysql connection automatically