When mysql is the master and slave of Synchronize, the incremental data is through binlog Synchronize, so how did the original data get past Synchronize?

as mentioned above, after starting the master-slave Synchronize, the master may not have all the binlog, so how is the original data transmitted to the slave?
for example, if there are 5000 data items on master, and then binlog and master-slave Synchronize are enabled, then only 5001 data items will be transferred from binlog Synchronize to slave,. How did the 5000 data items before then be transferred to slave?


after looking for it for a long time, I couldn't find the relevant information. I tried to know that when the master and slave Synchronize is opened, the old data of the master database will not automatically Synchronize to the slave database. You need to execute mysqldump to dump the data, import it into slave, and then start slave it.

Note that if you need to open the master-slave Synchronize non-stop, you can try to add the parameter-- master-data to mysqldump, so that the binlog site will be automatically set after importing the slave library.

Menu