The preparation of cold molecules is of great importance in many contexts, such as fundamental physics investigations, high-resolution spectroscopy of complex molecules, cold chemistry and astrochemistry. One versatile and widely applied method to cool molecules is helium buffer-gas cooling in either a supersonic beam expansion or a cryogenic trap environment. Another more recent method applicable to trapped molecular ions relies on sympathetic translational cooling, through collisional interactions with co-trapped, laser-cooled atomic ions, into spatially ordered structures called Coulomb crystals, combined with laser-controlled internal-state preparation. Here we present experimental results on helium buffer-gas cooling of the rotational degrees of freedom of MgH+ molecular ions, which have been trapped and sympathetically cooled in a cryogenic linear radio-frequency quadrupole trap. With helium collision rates of only about ten per second-that is, four to five orders of magnitude lower than in typical buffer-gas cooling settings-we have cooled a single molecular ion to a rotational temperature of a kelvin, the lowest such temperature so far measured. In addition, by varying the shape of, or the number of atomic and molecular ions in, larger Coulomb crystals, or both, we have tuned the effective rotational temperature from about 7a kelvin to about 60â kelvin by changing the translational micromotion energy of the ions. The extremely low helium collision rate may allow for sympathetic sideband cooling of single molecular ions, and eventually make quantum-logic spectroscopy of buffer-gas-cooled molecular ions feasible. Furthermore, application of the present cooling scheme to complex molecular ions should enable single-or few-state manipulations of individual molecules of biological interest.