MySQL replication gotchas in /etc/my.cnf
If you're doing selective replication with MySQL (telling a slave to ignore some of the updates being sent from the master), you might have a line in your /etc/my.cnf file that looks like this:
Now, if you wanted to get more than one database, you need to list each one. The working show slave info would reflect thisreplicate-wild-do-table=database.%
Replicate_Wild_Do_Table: database1.%,database2.%
but you cannot list the databases in /etc/my.cnf that way! You must list them on separate lines, or the Replicate_wild_do_table doesn't get set properly:
| RIGHT | WRONG |
|---|---|
replicate-wild-do-table=database1.% replicate-wild-do-table=database2.% |
replicate-wild-do-table=database1.%,database2.% |