单台服务器上的Mysql复制 [英] Mysql replication on single server

查看:41
本文介绍了单台服务器上的Mysql复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在单个 mysql 服务器上设置复制,将几个表(用于只读访问)从一个数据库复制到另一个数据库?

Is it possible to set up replication on a single mysql server, replicating a few tables (for readonly access) from one database to another?

假设我的服务器有 2 个数据库 - DB1 和 DB2.DB1 有表 tableA、tableB 和 tableC.DB2 有表 tableD、tableE 和 tableF.在 DB2 中,我想访问 tableA 中的数据,而无需进行跨数据库查询,因为数据库最终将驻留在不同机器上的单独 mysql 服务器上.

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 DB2, 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.

推荐答案

试试这个 ...

http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-wild-do-table

这篇关于单台服务器上的Mysql复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆