I've been reading about MySQL replication and all the resources I've looked at say that a data import (be it a mysqldump, or a raw data dump import) is needed before replication can start. I'm trying to understand why is that. Would it be possible to start replication from a master, where binary logs were saved from the beginning, by telling the slave to replicate from log position 1 (not sure if it's supposed to be 1 or 0 also).
Thanks in advance
-
However, after time, the bulk of the binlogs will make that approach impractical.Rick James– Rick James2019年08月12日 16:27:54 +00:00Commented Aug 12, 2019 at 16:27
-
Can you elaborate? Impractical why?jazzimier– jazzimier2019年08月13日 06:07:58 +00:00Commented Aug 13, 2019 at 6:07
-
What is the total space taken by the binlogs now? Now much space after collecting them for another year?Rick James– Rick James2019年08月13日 14:33:33 +00:00Commented Aug 13, 2019 at 14:33
1 Answer 1
If the binary logs contain absolutely everything that created that master (including grants, create database, create table, INSERTs, UPDATEs, and DELETEs), then yes it is possible.
The log position you need is not 0 or 1. It is 4 (See my post Question on having a MySQL 5.1 replicate from a MySQL 5.6 DB)
-
0 and 4 seem to be interchangeable for a starting position. I have used both; I never tried "1".Rick James– Rick James2019年08月12日 16:27:13 +00:00Commented Aug 12, 2019 at 16:27
Explore related questions
See similar questions with these tags.