Update mongodb connection