0

I have development mysql master and slave servers and a prod server. I need to set up regular (once a week) syncronization of dev and prod databases. It would be easy for me to use prod# mysqldump > dump.sql and dev-master# mysql < dump.sql as it won't break replication, but having a 170Gb base it is not very good idea. So the question is if there's a proper way to re-enable replication after re-writing database on master. Will it work if I just re-write database on both master and slave and hope no bin-log errors occure?

Upd: percona-server-server-5.6, InnoDB/Barracuda are used.

1
  • Please add mysql in tag.
    – vijayp
    Sep 19, 2014 at 12:56

1 Answer 1

0

The solution I found for myself is: stop both master and slave remove logs replace ib* files and /var/lib/mysql/mybase/* with files from prod backup start mysql on master start mysql on slave with --skip-slave-start, then SLAVE RESET; SLAVE START;

Not sure if this is correct, but it works for now.

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.