Reconfigurable intelligent surface (RIS) is an emerging technology to enhance wireless communication in terms of energy cost and system performance by equipping a considerable quantity of nearly passive reflecting elements. This study focuses on a downlink RIS-assisted multiple-input multiple-output (MIMO) wireless communication system that comprises three communication links of Rician channel, including base station (BS) to RIS, RIS to user, and BS to user. The objective is to design an optimal transmit covariance matrix at BS and diagonal phase-shifting matrix at RIS to maximize the achievable ergodic rate by exploiting the statistical channel state information at BS. Therefore, a large-system approximation of the achievable ergodic rate is derived using the replica method in large dimension random matrix theory. This large-system approximation enables the identification of asymptotic-optimal transmit covariance and diagonal phase-shifting matrices using an alternating optimization algorithm. Simulation results show that the large-system results are consistent with the achievable ergodic rate calculated by Monte Carlo averaging. The results verify that the proposed algorithm can significantly enhance the RIS-assisted MIMO system performance.