Setting Up Binary Log File Position Based Replication 1. Acquire a read lock and get the source’s status. See Section 17.1.2.4, “Obtaining the Replication Source Binary Log Coordinates” . 2. Make a copy of the MySQL data files. The following examples show common ways to do this. You need to choose only one of them: 3. In the client where you acquired the read lock, release the lock: •Configured the source with the necessary configuration properties. See Section 17.1.2.1, “Setting the Replication Source Configuration” . •Obtained the source status information, or a copy of the source’s binary log index file made during a shutdown for the data snapshot. See Section 17.1.2.4, “Obtaining the Replication Source Binary Log Coordinates” . •On the source, released the read lock: •On the replica, edited the MySQL configuration. See Section 17.1.2.2, “Setting the Replica Configuration” . •If you do not have a snapshot of a database to import, see Setting Up Replication with New Source and Replicas. •If you have a snapshot of a database to import, see Setting Up Replication with Existing Data. 1. Start up the replica. 2. Execute a  CHANGE REPLICATION SOURCE TO  |  CHANGE MASTER TO  statement on the replica to set the source configuration. See Section 17.1.2.7, “Setting the Source Configuration on the Replica” . Perform these replica setup steps on each replica. To set up replication between a source and a new replica: When there is no snapshot of a previous database to import, configure the replica to start replication from the new source. The next steps depend on whether you have existing data to import to the replica or not. See Section 17.1.2.5, “Choosing a Method for Data Snapshots”  for more information. Choose one of the following: The following sections describe how to set up replicas. Before you proceed, ensure that you have: Once you have created the archive or copy of the database, copy the files to each replica before starting the replication process. shell>  tar cf  /tmp/db.tar ./data shell>  zip -r  /tmp/db.zip ./data shell>  rsync --recursive  ./data /tmp/dbdata mysql>  UNLOCK TABLES; mysql>  UNLOCK TABLES; Setting Up Replication with New Source and Replicas 17.1.2.6 Setting Up Replicas 3445