Inland waterway transportation is one of the most important means to transport cargo in rivers and canals. To facilitate autonomous navigation for ships in inland waterways, this paper proposes a data-driven approach for predictions and control of underactuated ships with unknown dynamics, which integrates model predictive control (MPC) with an iterative learning control (ILC) scheme. In each iteration, kernel-based linear regressors are used to identify the relations between the evolution of ship states and control inputs based on the stored data from previous iterations and the collected data during operation, so as to build the system prediction model. The data are dynamically used to fix the prediction model over iterations, as well as to improve the controller performance until it converges. The proposed approach does not require prior knowledge regarding the hydrodynamic coefficients and ship parameters, but learns from the data instead. In addition, it exploits the advantages of MPC in handling constraints with minimised overall cost. Simulation results show that the controller could start from a nominal, linear data-driven ship model and then learn to reduce the path-following errors based on the data obtained over iterations.