Why MySQL replication is better than mysql binlogs for recovery

1826 ワード

この記事の転載は以下の通りです http://www.xaprb.com/blog/2010/09/04/why-mysql-replication-is-better-than-mysqlbinlog-for-recovery/
You have a backup,and you have the binary logs between that backup and now.You need to point-in-time recovery(PITR)for some reason.What do?The tradtional answer is"restore the backup and then use mysqlbinlog s to apply the binary logs."But there’s a much better way to it.
The better way is to set up a server instance with no data、and load the binary logs logs into it.I call thisa“binlogserver.”The n restore your backup and start the server ver ver asa replication ssssslalalalalalalalalalalalalalareplicication sssssssssssssssssssssslalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalalala
Why is this betterBecause replication is a more tetested way of apaplying binary logs to a server.The rereultsare are muce e morekelyto be coret,in my opinion.Plus,replication isisis and conveveinntinto use.You.You cado can niconconconconststststininininine.You.You.You.You.You.You.You cado can niniconconconconconconconcontrtrtrtrtrtrtrtrtrtre.You.You.You.You.You.You.You nininiststststststststststso on.
Replication also has the ability to corectly reproduce more types of changes than mysql binlogs does.Try this with statement-based replication:
insert into tbl(col) values(connection_id());
That’ll work just fine through replication、because the SQL thread on the slaave will change its connection ID to match the original.It won’t work through mysql bilogs.
What are your favorite MySQL bug reports?
Beware of svctm in Linux's iostat
Posted on Sat,Sep 4,2010.Apple 300 Word.
最近MySQL运维の勉强に参加して、先生はこの文章を勉强と技术の向上の拡大として読んで、まず自分のブログに记录して、それからゆっくりと消化して、勉强して、高めます。この記事は「ログシステム」のテーマに関連しています。