In the process of implementing the mysql master-slave architecture, you can use the mysqldump-based method to build the master-slave architecture. Mysqldump has generated GTID information during the backup process, that is, these GTID can be skipped. for unskipped GTID, I/O threads are copied to the slave server and executed by the SQL thread. This article mainly demonstrates how to set up mysql master/slave in GTID mode. For more information, see configure MySQLGTID master-slave replication to quickly build a slave database based on mysqldump. use mysqldump to build a master-slave architecture. Mysqldump has generated GTID information during the backup process, that is, these GTID can be skipped. for unskipped GTID, I/O threads are copied to the slave server and executed by the SQL thread. This article mainly demonstrates how to set up mysql master/slave in GTID mode. For more information, see: Configure MySQL GTID master-slave replication. quickly build a slave database based on mysqldump. use mysqldump to export the database. 1. GTID method 1. if all the binlogs of the master are still running, after installing slave, directly change the master to the master. The principle is to directly obtain all the gtids of the master and execute the command. the advantage is that if there are too many binlogs, full data synchronization takes a long time, and the master needs to start GTID from the very beginning. Conclusion: it is applicable to the situation where the master is not new soon. 2
1. build gtid master/slave based on mysqldump
Introduction: What is GTID: GTID (global transaction id) is the id of a committed transaction and a globally unique id. Components: UUID + TID what is UUID: unique identifier of the Mysql instance. What is TID: TID indicates the number of committed transactions on the instance, increasing monotonically with the transaction commit. Example: 6dec6fd5-eb1f-
The above is a summary of the details about the gtid master and slave notes. For more information, see other related articles in the first PHP community!