julien-duponchelle/python-mysql-replication

If binlog has been removed due to expire_log_days(), there's no way to replicate data?

joseya7 opened this issue · 1 comments

Hello.

I'm trying to replicate data from mysql,
but my binlog has been removed due to expire_log_day.

But I can't get the binlog back by turing on/off my db, because turining it on/off is not an option.

I heard that existing data, not ongoing data can be replicated without binlog.

Could you lead me the way?

Long story short: yes, you need the binlog.

In every mysql replication system the bootstrap (setting up of a new replica) involves recording the binlog position, dump and import, then starting the process that applies the binlog, and wait for it to catch up.

With row based replication you can create a new database, new tables, and insert ... select * from ... the original tables, which will create a lot of binlog for you with the contents.