I am currently working to get GTID based replication established between mySQL 5.7.33 on 2 servers. Amidst this work, I ran into a disk space issue and purged the binary logs on the master.

Now I have run into the problem where I cannot get the replication started due to the missing binary logs.

What can I do, without the bin logs, to get replication going?

Thanks for any advice!

  • Start over, I guess.
    – mustaccio
    Apr 7, 2021 at 1:46

1 Answer 1


Whether you use GTID or not, any replica needs a continuous stream of binlogs to keep in sync.

If any of the binlogs needed for the replica to catch up are gone, then it's trash. It can never catch up.

You need to reinitialize the replica. As if you were creating a new replica: make a new backup from the master, and use it to overwrite the replica. Then the replica can catch up from the point you created the backup.

  • I am fine with reinitializing the replica. Can I do this from a mysqldump backup? Do I need to set the master pos after the backup? Thank you for the guidance - I am a programmer and not a DBA, as you can probably tell by my deletion of the bin logs in the first place. Apr 7, 2021 at 1:25
  • A bit late on answer, you probably solved this already but for others. Yes after you recreate the database via mysqldump on slave then restart replication it should pick up the new entries as the master database will have moved on and the GTIDs on the replica will be behind and replication will try to catch up. Jul 28, 2021 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.