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.

I have a master slave setup both mysql 5.5, the setup is fine except that the slave won't Binary log to the standard mysql-binlog only to the relay logs. I fear this may be due to my lack of understanding on the matter but my ultimate goal is to setup another slave feeding off the current slave to then point the two together for a master-master relationship.

My problem is that although on the slave I can insert a record and the master replication position (on the slave) will change, it will not change as a result of slave activity on the same database. Will the slave not dump activity into both logs? If i point the secondary slave to relay logs what are my options down the line?

Hope that makes sense.

my my.ini setup on the slave is as such, a unique server id and hostname are also set:

binlog-do-db=our_database  
binlog-ignore-db=mysql  
binlog-ignore-db=test  
replicate-do-db=our_database  
share|improve this question

migrated from stackoverflow.com Dec 5 '12 at 1:40

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

You forgot one thing

binlog-do-db=our_database  
binlog-ignore-db=mysql  
binlog-ignore-db=test  
replicate-do-db=our_database  
log-slave-updates

The option log-slave-updates takes SQL that was read from relay logs and records them in the Slave Binary Logs when the SQL is completed.

Please be very careful. You should never use binlog-do-db and binlog-ignore-db simultaneously. I wrote about this back on Jun 14, 2012 ( Configured MySQL replication but its not working ) which points to an old Percona article on binlog-do-db being dangerous.

SUGGESTION

Of the things you are using, you only need these lines

replicate-do-db=our_database  
log-slave-updates

You really don't need binlog-do-db=our_database once you have log-slave-updates working properly.

share|improve this answer
    
You were exactly right, as soon as that flag went in everything started going. I've taken your advice and cleaned up the ini file also, thanks again. –  Matt Lester Dec 5 '12 at 10:05

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.