To prevent data loss and damage in MySQL database for a variety of causes, to ensure the normal and efficient operation of information systems and websites based on MySQL databases, this paper takes China Agricultural University website as an example, to explore how to develop reasonable backup and recovery strategies to build a highly available and highly reliable MySQL database backup and recovery system. Based on MySQL master-slave replication technology, this system implements real-time synchronization of data and automatic switching between master and slave database servers, which ensures the high availability of database when master database fails, meanwhile, by using logical backup technology which combines full backup with incremental backup, this system achieves full recovery of data to ensure the high reliability of database when data misuse occurs.