List:Replication« Previous MessageNext Message »
From:Ian Simpson Date:September 22 2009 4:23pm
Subject:Re: borked replication
View as plain text  
Hi Andrei,

You probably want to pass the --master-data option to the mysqldump; it
will add the relay log position of the master to the dump file, which
will help with the set-up.

You should also either prevent any writes to the master database during
the dump, or if you are using InnoDB use the --single-transaction
option, to prevent the data in the dump being inconsistent.

On Tue, 2009-09-22 at 11:39 -0400, Andrei F wrote:
> Hello,
> 
> I'm trying to fix a MySQL replication issue. Currently here are major
> discrepancies between the master and the slave.
> Replication has been broken for the past couple of weeks. Here's my plan,
> please correct me if I'm wrong:
> 
> 1) grab a dump of the master (server) database: mysqldump -u -p dbname >
> dbname.sql
> 
> 2) drop the slave/partially replicated database on the slave server: drop
> database <dbname>
> 
> 3) import the db dump created at step #1 into the slave server.
> 
> 4) start replication.
> 
> 5) get rid of old binary log cruft that's no longer needed.
> 
> Again, please correct me if I'm wrong.
> 
> regards
-- 
Ian Simpson
System Administrator
MyJobGroup

Thread
borked replicationAndrei F22 Sep
  • Re: borked replicationMiguel Angel Nieto22 Sep
  • Re: borked replicationMarcus Bointon23 Sep
    • Re: borked replicationPankaj Joshi23 Sep
  • Re: borked replicationIan Simpson23 Sep
  • Re: borked replicationAndrej Pintar23 Sep
    • Re: borked replicationAndrei F23 Sep
      • Re: borked replicationapi98424 Sep
      • Re: borked replicationMats Kindahl25 Sep