MySQL master-slave replication:
Some points to note: 1, master must open Binglog, set a unique server ID 2, each slave must be set unique server ID 3, for slaves to establish a can read the Master Binlog authorization account 4, If master has data, you must copy the existing data to slave, and use Chagne master to set the master's postition, file, host, and so on.
MySQL's binlog consists of three forms: statement-based,row-based,mixed
Statement-based: The advantages are very simple, save disk space, compatibility good; Many of the statements are not able to correctly express such as containing Rand (), Delete/update...limit without Order by,version (), UUID (), UDF, for complex statements needs to be evaluated and executed, whereas for row-based, only affetced rows will be executed.
Row-based: Advantages 1 All changes can be duplicated; 2 fewer row lock requirements, increased concurrency disadvantage for some insert UPDATE statements, you may need a lot of disk space, and for Mysiam there may be no way to perform concurrent insertions (table locks)
MySQL Master-slave replication