Difference between revisions of "Choosing a MySQL Replication Strategy"

From LongJump Support Wiki
imported>Aeric
 
imported>Aeric
Line 6: Line 6:
:* '''Mixed-Based Replication''' (MBR), which is a combination of the two.
:* '''Mixed-Based Replication''' (MBR), which is a combination of the two.


With Statement-Based Replication, SQL statements are propagated using the standard statement-based, binary logging format. That is the default replication format in the version of MySQL that ships with LongJump.
With Statement-Based Replication, SQL statements are propagated using the standard statement-based, binary logging format. That is the default replication format in the version of MySQL that ships with the platform.


Row-based binary logging is a mechanism that logs changes in individual table rows. With row-based replication, the master writes events to the binary log that indicate how individual table rows are changed.
Row-based binary logging is a mechanism that logs changes in individual table rows. With row-based replication, the master writes events to the binary log that indicate how individual table rows are changed.

Revision as of 22:18, 22 June 2011

Choosing a MySQL Replication Strategy

MySQL supports several replication formats:

  • Statement-Based Replication (SBR), which replicates entire SQL statements
  • Row-Based Replication (RBR), which replicates only changed rows.
  • Mixed-Based Replication (MBR), which is a combination of the two.

With Statement-Based Replication, SQL statements are propagated using the standard statement-based, binary logging format. That is the default replication format in the version of MySQL that ships with the platform.

Row-based binary logging is a mechanism that logs changes in individual table rows. With row-based replication, the master writes events to the binary log that indicate how individual table rows are changed.

When mixed format is in effect, statement-based logging is used by default, but automatically switches to row-based logging when it is necessary to do so.

Learn More: