A complex and changeable water environment is a key factor for safe rock engineering. Variations in water distribution and pressure pose serious challenges in evaluating rock properties and failure modes. To investigate the effect of real water‒rock interactions on rock mechanical behavior, the self-developed hydraulic loading test equipment was designed. A series of mechanical experiments (unjacketed) were carried out on three representative types of rocks under different water pressure environments, and the jacketed test was also performed for the saturated rocks. The experimental results showed that with increasing water confining pressure, the stress‒strain curve of the saturated rocks increased, while that of the dry rocks first decreased and then increased, and that of the sandstone became more obvious. Furthermore, when the water confining pressure increased, the peak stress and elastic modulus of the saturated rocks increased linearly, and those of the dry rocks first decreased and then increased more sharply. Interestingly, the water confining pressure weakened the local tensile failure and aggravated the shear failure. The relationship between the water confining pressure and strength also indicated that the change of saturated rocks more slowly when in contact with the water confining pressure. From the above results, the pore water pressure correction coefficients (μ) of sandstone, marble and granite were 0.98, 0.96 and 0.93, respectively, in the water pressure environment and rock connection. The failure mechanism of saturated rocks is similar to that of rocks without confining pressure due to the balance of the water confining pressure and pore water pressure, and pore water pressure mainly acts as piestic water. For dry rocks, the penetration of pore water firstly weakens the mechanical properties of rocks when pore water pressure is smaller. A greater confining pressure enhances the role of traditional confining pressure for granite and dry rocks.