- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
马哥教育 MySQL Replication Include MySQL 5.6 MySQL Replication 4 多级复制 读写分离 垂直拆分 scale out 分库 scale on rid, price: amoeba lamp: PHP server-id MySQL Replication Common Use Cases More Advanced Use Cases MySQL 5.6 Advanced Replication Features MySQL Utilities Summary What is Replication? For the purposes of this paper we define “replication” as the duplication of data to one or more locations These can be co-located within a data center, or geographically distributed Replication enables a database to copy or duplicate changes from one physical location or system to another Replication Happens at MySQL level, not Storage EngineLevel(*NDB) Asynchronous!(Semi-syncavailablein5.5) A server can have only 1 master IO Thread: Fetches from master SQL Thread: Executes on slave Single Threaded Execution (Expect enhancements in 5.6) Different schema’s are possible between master and slave (Watchout!!): different indexes storage engines data types columns Binary Logs Set of files Contains all writes and schema changes != REDO/Transaction log Rotated when full (Set max_binlog_size) Incrementing numbers (000001, 000002, 000003, ...) Relay Logs are also binary logs 2 Formats: Statement Based (SBR) Row based (RBR, since mysql 5.1) mixed MySQL supports two kinds of replication: statement-based replication and row-based replication Statement-based (or “logical”) replication has been available since MySQL 3.23, and it’s what most people are using in production today Row-based replication is new in MySQL 5.1 Both kinds work by recording changes in the master’s binary log and replaying the log on the slave MySQL’s replication is mostly backward compatible. That is, a newer server can usually be a slave of an older server without trouble Replication is relatively good for scaling reads, which you can direct to a slave, but it’s not a good way to scale writes unless you design it right Attaching many slaves to a master simply causes the writes to be done many times, once on ea
文档评论(0)