MySQL Replication Master push to Slave
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 &lt;online server IP&gt;&lt;space&gt;&lt;MySQL port&gt; 

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:

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