In mysql master-slave Replication which server requests the other?
according to this reference: Get MySQL Replication up and running in 5 minutes, Slave must access master to initialize.
slave&gt; CHANGE MASTER TO MASTER_HOST='192.168.0.31',
 -&gt; MASTER_USER='repl_user',
 -&gt; MASTER_PASSWORD='billy',
 -&gt; MASTER_LOG_FILE='',
 -&gt; MASTER_LOG_POS=4;

So, you can setup slave in localhost and master in remote host with accessible IP and port.
This is a client server communication: