问题
Is it possible to replicate a single table?
回答1:
Yes this is possible. Have a look at the slave options of the MySQL manual. This still requires to create a complete binlog of the whole database though.
回答2:
To sync specific tables again to one or more slaves rather use pt-table-checksum and then pt-table-sync
That should automatically identify the out-of-sync tables and only sync those.
回答3:
I know this is an old question but this is for anyone who comes here looking for an answer:
CREATE TABLE table2 LIKE table1;
This will create a table with the same format and columns but no data. To transfer the data use:
INSERT INTO table2 SELECT * FROM table1;
EDIT:
It is important to note that this is an information transfer only. Meaning if you had indexes on table1 they are not transferred to table2. You will have to manually index table2
来源:https://stackoverflow.com/questions/2962721/replicate-a-single-table