Mysql replication on single server
Is it possible to set up replication on a single mysql server, replicating a few tables (for readonly access) from one database to another?
So say my server has 2 databases - DB1 and DB2. DB1 has tables tableA, tableB, and tableC. DB2 has tables tableD, tableE, and tableF. From D开发者_开发技巧B2, I'd like to have access to data in tableA without doing a cross-database query because the databases will eventually reside on separate mysql servers on separate machines.
Try this ...
http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-wild-do-table
Sure, you can do replication on a single MySQL server. But I think you may like to have a look at the FEDERATED storage engine - http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html.
A word of caution though that FEDERATED tables have their own limitations and I think they do not perform very well with very busy tables. So, you'll need to burn some hours to research on federated tables and see if they work for your setup.
精彩评论