We present the first spectroscopic abundance determination of iron, alpha-elements (Si, Ca and Ti) and sodium for the Mira variable V1 in the metal-rich globular cluster NGC 5927. We use high-resolution (R~ 28,000), high signal-to-noise ratio (~200) spectra collected with WINERED, a near-infrared (NIR) spectrograph covering simultaneously the wavelength range 0.91--1.35 micron. The effective temperature and the surface gravity at the pulsation phase of the spectroscopic observation were estimated using both optical (V) and NIR time-series photometric data. We found that the Mira is metal-rich ([Fe/H]=-0.55 pm 0.15) and moderately alpha-enhanced ([alpha/Fe]=0.15 pm 0.01, sigma=0.2). These values agree quite well with the mean cluster abundances based on high-resolution optical spectra of several cluster red giants available in the literature ([Fe/H]=-0.47 pm 0.06, [alpha/Fe]=+0.24 pm 0.05). We also found a Na abundance of +0.35 pm 0.20 that is higher than the mean cluster abundance based on optical spectra (+0.18 pm 0.13). However, the lack of similar spectra for cluster red giants and that of corrections for departures from local-thermodynamical equilibrium prevents us from establishing whether the difference is intrinsic or connected with multiple populations. These findings indicate a strong similarity between optical and NIR metallicity scales in spite of the difference in the experimental equipment, data analysis and in the adopted spectroscopic diagnostics.