0

Situation:

MySQL server "Src" is behind a router. So "Src" has no public address.
How could I replicate "Src" to MySQL server "Dst" who has public address.

Maybe there are some agent tools who act as a agent run on "Src" host
will read update from "Src", replicate to "Dst"

tryer3000
  • 829
  • 10
  • 14

1 Answers1

0

What do you mean by replicate?

Is that replication or backup as defined on the MySQL site?

For a replication scenario, the slave ("Dst") must be able to talk to the master ("Src") to request replication data, which is not possible in your set-up. The MySQL site states:

Each slave that connects to the master requests a copy of the binary log. That is, it pulls the data from the master, rather than the master pushing the data to the slave.

It could work using a reverse tunnel. See this SO post for how.

A backup scenario can use mysqldump on "Src" to dump the database to a file and then upload or otherwise transfer the file to "Dst". This can be scheduled using a cron job on Linux or 'Task Scheduler' on Windows.

Community
  • 1
  • 1
NZD
  • 1,780
  • 2
  • 20
  • 29
  • Yes, That's why I want the agent run in "Src" host. – tryer3000 Nov 17 '15 at 04:17
  • @tryer3000 Some questions: (1) Do you need replicate or backup? (2) Are you running Linux or Windows? – NZD Nov 18 '15 at 18:22
  • @tryer3000. It could work using a reverse tunnel. See this [SO post](http://stackoverflow.com/q/18166143/4459346) for how. – NZD Nov 19 '15 at 06:03