What causes the MySQL error 1062 – duplicate entry when starting slave?

What to try to fix your problem: You should remove master.info on slave first and restart mysql issue CHANGE MASTER TO MASTER_HOST=’XX.XX.XX.XX’, MASTER_USER=’repl’, MASTER_PASSWORD=’slavepass’; do mysqldump with ‘–flush-logs’ option on master ‘mysql -u user -p < dump.sql’ on slave ‘show slave status\G’ on slave to ensure that it is properly configured, MASTER_LOG_POS is 0 ‘start … Read more

How to setup MySQL replication with minimal downtime

I assume you use InnoDB as a storage engine. If so, you need to turn on bin-logging. If it’s not on now, you need to restart MySQL after modifying my.cnf. It is the only downtime, after which you can take dump of the database with binlog position without blocking the database: mysqldump –skip-lock-tables –single-transaction –flush-logs … Read more