2
votes

I have two MySQL servers configured in a Master-Slave relationship.

Master -> my.cnf:

server-id=1283522287
log-bin = /var/log/mysql/binary.log    // There are write permissions here.
binlog_do_db= foo,bar

Slave -> my.cnf:

server-id = 1283706035
master-host = {master internal IP}
master-port = 3306
master-user = {master slave user}
master-password = {master slave user password}

However, although MySQL reports that replication is up and running, that is:

  • "show master status;" gives a valid position and file
  • "show slave status\G" reports that Slave_IO_Running and Slave_SQL_Running are both "Yes".
  • The slave is shown in the list of connected slaves, as viewed from the master.

Replication doesn't work. Whenever a change is made, the master file log position doesn't change. It stays at the starting size of 106 (bytes?).

Anybody have any idea what I'm missing?

1

1 Answers

8
votes

... and I seem to have answered my own question, proving furthermore that one should NEVER ask questions on SO on Monday morning, after you'd had a weekend's sleep.

I had replication working great without the binlog-do-db statement, but it looked as though that would synchronize the mysql and information_schema, so I added that line:

binlog-do-db = foo,bar

Apparently, you can't comma delimit this (from the MySQL Manual):

Important

To log multiple databases, use this option multiple times, specifying the option once for each database to be logged. Because database names can contain commas, the list will be treated as the name of a single database if you supply a comma-separated list.

Great.