MySQL Slave Relay Logging but not logging Binary Log

logsMySQLmysql-5.5replicationwamp

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  

Best Answer

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.