doutou3725 2015-04-15 11:51
浏览 71

如何在两台不同的机器上链接两个mysql数据库? [关闭]

I have a mysql database called 'sample1' on one of my windows laptops and another mysql database called 'sample2' in the other machine. I want to connect both these machines together first and link the databases 'sample1' and 'sample2' so that the query I execute in 'sample1' must be reflected in 'sample2' also (distributed query processing).

Eg: if sample1 and sample2 contain 5 records, by deleting a record in sample1 must be reflected in sample2 also.

I use WAMP and work on PHP alongside MySQL. Kindly help...

  • 写回答

4条回答 默认 最新

  • douqiao1997 2015-04-15 12:06
    关注

    As I understand, You need that sample1 is identical to sample2 and that automaticly the queries are distributed.

    It looks like the best way (maybe not the easiest) is to use the replication of mysql : https://dev.mysql.com/doc/refman/5.0/en/replication-howto.html

    EDIT : this answer may not be the answer that you need because with replication you will need that 1 of the two server (The master server) stay up everytime or you will need a third server if you want to shutdown the two other.

    评论

报告相同问题?

悬赏问题

  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退