Context : Most stellar activity cycles similar to that found in the Sun have been detected by using the chromospheric Ca ii H & K lines as stellar activity proxies . However , it is unclear if such activity cycles could be identified using other optical lines . Aims : To detect activity cycles in solar-analog stars and determine if these can be identified through other optical lines , such as Fe II and Balmer lines . We study the solar-analog star HD 45184 using HARPS spectra , whose temporal coverage and the high quality of the spectra allow us to detect both long and short-term activity variations . Methods : We analyse the activity signatures of HD 45184 by using 291 HARPS spectra obtained between 2003 and 2014 . In order to search for line-core fluxes variations , we focus on Ca ii H & K and Balmer H \alpha , H \beta lines , which are usually used as optical chromospheric activity indicators . We calculate the HARPS-S index from Ca ii H & K lines and convert it to the Mount-Wilson scale . In addition , we also consider as activity indicators the equivalent widths of Balmer lines . Moreover , we analyse the possible variability of Fe ii and other metallic lines in the optical spectra . The spectral variations are analysed for periodicity using the Lomb-Scargle periodogram . Results : We report for the first time a long-term 5.14-yr activity cycle in the solar-analog star HD 45184 derived from Mount Wilson S index . This makes HD 45184 one of most similar stars to the Sun with known activity cycle . Such variation is also evident in the first lines of the Balmer series , which not always show a correlation with activity in solar-type stars . Notably , unlike the solar case , we also found that the equivalent widths of the high photospheric Fe ii lines ( 4924 Å , 5018 Å and 5169 Å ) are modulated ( \pm 2 mÅ ) by the chromospheric cycle of the star . These metallic lines show variations above 4 \sigma in the RMS spectrum , while some Ba ii and Ti ii lines present variations at 3 \sigma level which could be considered as marginal variations . From short-term modulation of the S index we calculate a rotational period of 19.98 days , which agrees with its mean chromospheric activity level . Then , we clearly show that the activity cycles of HD 45184 could be detected in both Fe ii and Balmer lines . Conclusions :