Your result is correct.
Pick a point on the cylindrical surface. You must convince yourself that one principal direction is perpendicular to the axis of the cylinder (but starting from your point of the surface). Along this direction, the surface looks like a circle with radius $R$, so the principal curvature for this direction is $\kappa_1=\frac1R$. The other principal direction is parallel to the cylinder axis, and along this direction, the surfaces looks (locally near your point) like a straight line, so $\kappa_2=0$. So from the formula $H=\frac12 (\kappa_1+\kappa_2)$ you get the mean curvature you mention.
As TonyK says, this is the same for any point you pick. So if you regard $H$ as a function, mapping each point on the surface to a real number, then $H$ is constant, for the cylindrical surface.
As we see, mean curvature is a local property, so it does not matter if the cylinder is infinitely long or not; as long as there is a neighborhood around the point you consider, where the surface is a cylinder, then the mean curvature at that point is $\frac1{2R}$.