MYSQL5.5 Master/Slave configuration: A-> B-> c a (Port 3307)-> B (Port 3308)-> C (Port 3309) I. configuration file www.2cto.com A (my. cnf): # configure a unique ID: server-id = 1 # enable binlog-bin log_slave_updates binlog_format = row # configure auto-increment offset auto_increment_increment = 3 auto_increment_offset = 1 B (my. cnf ): # configure a unique ID server-id = 2 # enable binlog log-bin log_slave_updates binlog_format = row # configure auto-increment offset auto_increment_increment = 3 auto_increment_offset = 2 # read-only C (my. cnf ): # configure a unique ID: server-id = 3 # enable binlog log-bin log_slave_updates binlog_format = row # configure auto-increment offset auto_increment_increment = 3 auto_increment_offset = 3 # read-only II, command Line: 1. RESET the master Status: reset master; 2. Authorize the synchronization User: grant replication slave on *. * TO 'repli _ user' @ '%' identified by 'repli _ pwd '; synchronization Username: repli_user, synchronization Username: repli_pwd, and permission IP address for replication slave: % (precise IP Address used in production) 3. Back up all data in database: mysqldump-uroot-p **-P3307-A-E-R -- master-data = 1> master_A. SQL B: 1. RESET the slave status: RESET SLAVE; 2. RESET the master Status: reset master; 3. Authorized synchronization User: grant replication slave on *. * TO 'repli _ user' @ '%' identified by 'repli _ pwd'; 4. Synchronization parameter configuration: change master to MASTER_HOST = 'localhost ', MASTER_USER = 'repli _ user', MASTER_PASSWORD = 'repli _ pwd', MASTER_PORT = 3307; 5. Import master database data: mysql-uroot-p **-P3307 <master_A. SQL 6. enable synchronization: start SLAVE; 7. Back up all data in database B: mysqldump-uroot-p **-P3308-A-E-R -- master-data = 1> master_ B. SQL C: 1. RESET the slave status: RESET SLAVE; 2. Configure synchronization parameters: change master to MASTER_HOST = 'localhost', MASTER_USER = 'repli _ user', MASTER_PASSWORD = 'repli _ pwd', MASTER_PORT = 3308; 3. import data from the MASTER database: mysql-uroot-p **-P3309 <master_ B. SQL 4. enable synchronization: start SLAVE;