In order to turn our attention to the real progress of the education world, this paper makes a concrete study on the efficiency optimization of MySQL database under big data. On the basis of discussing the significance of cultivating students' team spirit, this paper analyzes and discusses the strategies of cultivating students' team spirit in extracurricular sports activities. MySQL database, as one of the widely used open source databases, naturally has relatively excellent running efficiency, but it also poses a strong challenge for further improving the running efficiency of MySQL database. In many external services, databases are needed, whether in websites or other large-scale software. All the mobile users who need to use the database to store a large amount of user data have caused many websites to collect users and user behavior analysis, which can make them better optimize the website and products, so the dependence and application of data are increasing, and the optimization of databases can greatly improve the ability of developers to retrieve and analyze data.