The establishment of a master-slave database is generally based on the following three considerations:
1. Disaster recovery: The repository is offsite, the main library does not exist, the repository can be immediately taken over, no restoration time;
2. Load balancing: The main library to do additions and deletions, prepare the library to do queries, so many query services do not occupy the main library resources;
3. Data centralization and distribution: This model is mainly used to centralize data from branch offices to Headquarters, or from head office to company, provided that the company has little data to synchronize, and that inter-company business systems are not developed by the same company
MySQL Database master-Slave synchronization installation and configuration: (1) http://blog.sina.com.cn/s/blog_49fd52cf0100pog2.html
(2) Http://wenku.baidu.com/link?url=yWJDAHGb2qHLKA49f2Fpiy1PuMlHXGAuxT6Ljou76zBRJJpNj-WZjFgFEyrs-BXP8kW71p_ Vnglgkz5iczm2jiodoadzf2kaa2l2ffdfkti
MySQL main library and slave library are synchronized data through Binlog files: http://www.cnblogs.com/Richardzhu/p/3225254.html
Design of database main library and slave library in web design