From here, start with a detailed description of the copied content, copying from simple to introductory
The simplest mode of replication is as follows
Basic three simple steps
1 Configure a server for Master2 to configure a server for Slave3 to connect slave to master
First, configure the master
Requires configuration in three directions: binary log and unique server ID and authorization
Binary log: Record server changes
Server ID: Server ID distinguishes server uniqueness
The specific parameters involved are
Log-bin = Master-binlog-bin-index = Master-bin.indexserver-id = 1
Note: If not specified, the default file name is determined by the hostname
After modifying the configuration file, you need to restart the DB
SQL>Grantreplicationon *. * to [e-mail protected]'10.11.30.%'by'xyzzy '; SQL>privileges;
Second, the configuration slave
As with master, you need to configure Server-id,relay-log,relay-log-index
Server-id = 2relay-log-index = Slave-relay-bin.indexrelay-log = Slave-relay-bin
Note: If not specified, the default file name depends on hostname (a pit with the default value, and if the hostname is changed, the trunk log will not be able to locate the relay log index file and the replication fails)
Third, connect master and slave
Synchronize the replication with change master to, and then start copying the start slave when finished;
to = ' 10.11.30.69 ' = 3306 = 'repl_user'
Master_password='xyzzy';
Slave>start SLAVE;
MySQL Replication (a): Basic Steps for replication