After some hit and miss I think I nearly got it working, at least to a point where the replication started between the Master and the slave. It seemed to work for a few seconds, then bombed when the slave tried to execute a statement that was for a DB that it didn't have in it.
The point is that of all the several databases on the Master machine, at this point we only want to replicate one on the slave machine. I thought I had had that set up in the slave's my.cnf with the line
replicate-do-db - aid #aid is the database we want to replicate
however High Performance MySQL says that this is not the way to do this since filtering will be done on the current default database. "This is not usually what you want." :-)
The book does indicate that "On the slave, the
relicate_*options filter events as the slave SQL thread reads them from the relay log." This make sense to me, and at this point it also makes sense that the log coming from the master has every statement coming into the DB. It goes on to say that "You can replicate or ignore one or more databases (emphasis mine)...based on
LIKEpattern matching syntax." There is where I lose it. I understand how to use the
LIKEsyntax in mySQL statements, but not in this environment.
Is it possible to set up a small battery of statements in the slave my.cnf along the lines of:
Would that do it?
Is anyone basically doing replication in a simple Master-Slave relationship where you are only replicating one DB? If so, how are you doing it?