Mysql – Enabling theSQL replication using GTID after purging binlog

gtidMySQLreplication

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!

Best Answer

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.