Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

What is the Actual difference between Row based and Statement based replication I actually looking in terms of replication effect's on slave.

If I am using Row based replication then whats is the effect on slave and if i am using statement based then what is the effect.

Please also take the following parameters in consideration..

   replicate-ignore-db  and replicate-do-db 

Thanks....!

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Statement-Based Replication (SBR) will replicate SQL Statements. It is easier to read using mysqlbinlog dump program.

Row based replication (RBR) will replicate actual data changes. Binary logs and relay logs will grow much faster than SBR. You also cannot identify the SQL that generated the changes.

Here is a more comprehensive pros-and-cons list : http://www.databasejournal.com/features/mysql/article.php/3922266/Comparing-MySQL-Statement-Based-and-Row-Based-Replication.htm

MySQL will allow both types of statement/row formats in its binary logs. I recommend STATEMENT based. Default binary log format is MIXED which is OK.

Since you are using replicate-ignore-db and replicate-do-db, I would trust Statement-Based Replication.

share|improve this answer
    
what is default mode of replication SBR or RBR...?? –  Abdul Manaf Dec 9 '11 at 5:58
    
SBR - Statement –  RolandoMySQLDBA Dec 9 '11 at 5:59
    
thanks a lot .... –  Abdul Manaf Dec 9 '11 at 6:01
1  
The default mode is MIXED since 5.1.8, which uses primarily statement based replication, but automatically switches to RBR when queries that are unsafe with SBR are executed. dev.mysql.com/doc/refman/5.1/en/replication-formats.html –  Aaron Brown Dec 10 '11 at 4:44

In MySQL 5.5, statement-based format is the default. But it is better to use the mixed format. Because in that case, statement-based logging is used by default, but automatically switches to row-based logging in cases where-ever required.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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