Tau
Tau

Reputation: 468

Mysql Replicated database not updating properly

I have been trying to start replication in a mysql database. I followed all the steps from the mysql manual to setup and configure the replication.

http://dev.mysql.com/doc/refman/5.1/en/replication-howto.html

I could start the replication without any trouble. Newly inserted data was replicated properly. But after a while I observed that though INSERT are working, the UPDATEs are not replicating. So, my replicated database contains data just as it was inserted first time.

My master database is on an UNIX server with MYSQL-5.1.56. The slave is used in Windows using WAMP package with MYSQL 5.5.8. I have also tried a slave with lower version mysql with WAMP5, with same effect.

Please share your ideas and experience on this. Thanks.

Upvotes: 0

Views: 674

Answers (2)

Tau
Tau

Reputation: 468

I sorted it out a few months ago. The problem was, I tried to replicate only one single database, and set binlog_do_db and binlog-ignore-db options in master to select only that database. But that left out any statement which was executed without selecting database by USE database, as kayn said. Using replicate-ignore-db and replicate-do-db options in slave would do the same. So I finally fixed it by using the replicate-wild-do-table option in the slave, referenced here. Added the following line in the configuration of the slave server.

replicate-wild-do-table=mydb.%

Upvotes: 0

kayn
kayn

Reputation: 683

I have similar problem. I know it's old thread but it can help others:

link: mysql replication works only if I choose database by USE database

Upvotes: 1

Related Questions