The magnetohydrodynamic (MHD) stability of oscillating fluid with longitudinal magnetic field has been discussed. The problem is formulated and the (MHD) basic equations are solved. By using the computer procedure from different values of the acting magnetic field the stable and unstable regions are identified. This phenomenon is interest, academically and during the geological drilling in the crust of the earth as we have superposed gas-oil layer mixture fluids. A general eigenvalue relation is derived studied analytically and results are confirmed numerically.