0

Imagine I have three servers. x.x.x.31 - master x.x.x.32 - slave x.x.x.33 - slave

If I run a simple update in master. What does the slave servers done. run the update command or copy the updated data from master?

1 Answer 1

0

It depends on the replication configuration. The two Replication Formats are Statement-based Replication and Row-Based Replication.

The default is Statement-Based logging.

If the Statement-Based Replication is used, the master writes SQL statements to the binary log and the SQL statements are executed on the slave.

In the case of Row-Based Replcation, the master writes events to the binary log that indicate how individual tables rows are changed. These events are then copied to the slave.

Another format is Mixed-Based Replication. MySQL replication can also be configured to use a mix of both Statement and Row-Based logging. Statement-based log is used by default, but depending on certain statements, the log is automatically changed to row-based.

Refer to binlog_format, to configure the logging format and for binary log setting more information.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.