Reputation: 18439
Can anyone tell me the exact difference in replicate_wild_do_table and replicate_do_table while creating Slave.
Thanks
Upvotes: 0
Views: 4798
Reputation: 1531
replicate-wild-do-table
allows you to restrict replication statements to databases and tables using %
and _
wildcard characters, that is perform pattern matching.
Where replicate-do-table
uses concrete databases and tables names.
Here's a manual reference: link
UPDATE:
Seems like you are having trouble with USE
statement or fully qualified table names (those with database name specified) in your setup. First of all, there are 2 types of binary logging:
In short, statement-based replication logs every statement that could modify data and row-based logs modified rows.
Here's a manual reference: link
Here's a comparison from the manual: link
Those two types imply different behaviour for replication options. The key one here is that for statement-based replication MySQL replicates statements that are performed on default (selected via USE
) database only.
So the question is: do you need cross-database updates? If so, you can't use replicate-do-db
, because it restricts replication on database level. In terms of cross-database updates, there is no difference between replicate-wild-do-table
and replicate-do-table
.
Upvotes: 1