To set up the slave to communicate with the master for replication, you must tell the slave the necessary connection information. To do this, execute the following statement on the slave, replacing the option values with the actual values relevant to your system:
CHANGE MASTER TO->
Replication cannot use Unix socket files. You must be able to connect to the master MySQL server using TCP/IP.
CHANGE MASTER TO statement
has other options as well. For example, it is possible to set up
secure replication using SSL. For a full list of options, and
information about the maximum permissible length for the
string-valued options, see Section 184.108.40.206, “
CHANGE MASTER TO Syntax”.