开发者

MySQL replication by choice with custom data formatting

开发者 https://www.devze.com 2023-03-18 10:31 出处:网络
Is it possible to replicate a mysql database by choosing only the tables you want to be replicated (unto the target database) considering the target database has a slightly different structure.

Is it possible to replicate a mysql database by choosing only the tables you want to be replicated (unto the target database) considering the target database has a slightly different structure.

Consider the following:

I have a database loaded with all t开发者_JAVA技巧he data I need to be replicated to the target database. Let's call this our MasterDatabase

Now I have the TargetDatabase this is a lite version of the MasterDatabase and will be used will be used for the presentation layer. Note that the two database have tables with different structures.

Is replication possible in this scenario?

If not, is there a solution to update the data on the TargetDatabase from the MasterDatabase without doing massive updates maybe selective updates just as a normal replication would work?


Replication is somewhat flexible in the sense you can replicate to different storage engines, and yes, even selectively choose the data you want replicated.

Keep in mind though that replication is meant to be an identical copy of your source dataset. If you need different formats or different table definitions in your schema, it is not really data replication anymore.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号