Difference between revisions of "Choosing a MySQL Replication Strategy"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
 
Line 12: Line 12:


''Learn More'':
''Learn More'':
:* '''Replication''': http://dev.mysql.com/doc/refman/5.1/en/replication.html
:* '''Replication''': http://dev.mysql.com/doc/refman/{{MySqlVersion}}/en/replication.html
:* '''Replication formats''': http://dev.mysql.com/doc/refman/5.1/en/replication-formats.html
:* '''Replication formats''': http://dev.mysql.com/doc/refman/{{MySqlVersion}}/en/replication-formats.html
:* '''Comparison of Statement-Based and Row-Based Replication''':<br/> http://dev.mysql.com/doc/refman/5.1/en/replication-sbr-rbr.html
:* '''Comparison of Statement-Based and Row-Based Replication''':<br/> http://dev.mysql.com/doc/refman/{{MySqlVersion}}/en/replication-sbr-rbr.html
:* '''How To Set Up Database Replication In MySQL''':<br/>http://www.howtoforge.com/mysql_database_replication
:* '''How To Set Up Database Replication In MySQL''':<br/>http://www.howtoforge.com/mysql_database_replication
<noinclude>
<noinclude>

Latest revision as of 02:29, 19 March 2014

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: