It was shown in a previous paper (Ibáñez 2004) that for certain kind of plasmas the coefficient of second (bulk) viscosity can be orders of magnitude larger than the coefficients corresponding to the dynamical viscosity and to the thermometric conductivity. In the present paper, the damping effects of the second viscosity on the hydromagnetic waves propagation are analyzed. In particular, we study the effect of the second viscosity on the magnetoacustic waves propagating in a photoionized gas of arbitrary metallicity Z and mean energy E of the ionizing photons when an initial steady magnetic field H is present.