The mesopause is a key region where the Earth's atmosphere responds to variations in solar activity and wave perturbations from the lower atmosphere. Temperature in this region is an essential parameter for understanding the dynamical processes and climate variability in the middle and upper atmosphere. Rotational temperature of OH airglow is widely used to monitor long-term changes near the mesopause. To investigate the long-term temperature variability in this region, OH(3-1) airglow spectra obtained by a Ground-Based Infrared Spectrometer (GBIS) at Xinglong Station (40°24′N, 117°35′E), China, from 2017 to 2024 were analyzed. The OH rotational temperature was retrieved using a multispectral global optimization fitting algorithm. The results reveal a pronounced seasonal variation in the OH(3-1) rotational temperature. Analysis of the annual mean temperature, amplitude, and phase indicates that the OH(3-1) rotational temperature is also influenced by solar activity, consistent with the variation trends of the annual mean winter and summer temperatures.