The complexity of networking mechanisms will increase significantly because of the dense deployment of radio base stations in ultra-dense mobile networks. As a result, the existing networking mechanisms may be unable to efficiently manage ultra-dense mobile networks. To solve this problem, we propose a datadriven network optimization framework which integrates the big data analysis methods with networking mechanisms. In the proposed framework, we adopt big data analysis methods to divide densely deployed base stations into groups. Then, each group of base stations are managed with networking mechanisms independently. In this way, the complexity of the networking mechanisms is reduced. The key challenge in designing the framework is to optimally group base stations into clusters in realtime. Addressing this challenge, the proposed framework consists of an offline machine learning module and an online base station clustering and network optimization module. The offline machine learning module predicts the optimal number of base station groups in the next time interval based on the historical data. The online base station clustering and network optimization module clusters base stations and optimize the network in realtime. The performance of the proposed data-driven network management framework is validated through network simulations with real network data traces.