Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have two servers that need to be synced. One is online and has a public IP address. The other is internal and has no public IP address - nor is there a way to get it a public IP so that's off the table.

I'd like to set up replication between the two servers through MySQL but as I understand it, the MySQL slave needs to be able to connect to the master (i.e. the master doesn't just simply push data out) and that's a problem since there's no public IP or interface to connect to.

Is there any way to replicate and simply tell the master to push data to the slave (which it can access)? Alternatively, is there some other solution? I have considered a mysqldump periodically but the data is going to grow very quickly resulting in too-large dump files.

share|improve this question

migrated from stackoverflow.com Jan 30 at 16:31

This question came from our site for professional and enthusiast programmers.

    
just dump changes. etl and partitioning are your friends here. –  duffymo Jan 30 at 15:23
    
If both are on the same network you should be able to use internal ips even if only one is configured with a public. –  Panama Jack Jan 30 at 15:26
    
The answer you are looking for maybe found here: stackoverflow.com/questions/7722659/… –  user2881767 Jan 30 at 15:33

1 Answer 1

Make sure that you are able to connect to Remote MySQL server (Online server) from a Slave server machine. You can verify by using telnet command

# telnet <online server IP><space><MySQL port>

Now follow the replication procedures mentioned here:

http://dev.mysql.com/doc/refman/5.1/en/replication-howto.html

For Database synchronization refer existing answer here:

http://stackoverflow.com/questions/7946540/how-do-i-sync-2-mysql-databases

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.