List:Replication« Previous MessageNext Message »
From:FMGreen Date:November 23 2007 9:15am
Subject:Re: replication on Linux broken after db restore
View as plain text  
"make a dump of master database"

Hi there,
I gave your solution a go this morning.  However, the 'dump of master
database' after locking it was either hanging or taking forever when usually
dumps take only a minute.  Unfortunately I have very little time when I can
block access to the system to work on it so I had to kill the process and
give up until my next admin window.  Can you tell me if it is usual for a
locked database to take longer to dump or would you suspect that something
was not right.
Thanks!



martín arrieta wrote:
> 
> Hi,
> 
> If you have all config (in my.cnf files) done. You can do:
> 
> In master db run:
> mysql> FLUSH TABLES WITH READ LOCK;
> 
> mysql > SHOW MASTER STATUS;
> +---------------+----------+--------------+------------------+
> | File          | Position | Binlog_Do_DB | Binlog_Ignore_DB |
> +---------------+----------+--------------+------------------+
> | mysql-bin.003 | 73       | test         | manual,mysql     |
> +---------------+----------+--------------+------------------+
> 
> make a dump of master database
> 
> mysql> UNLOCK TABLES;
> 
> Then you have to restore the slave db from the master db dump
> 
> In slave db run:
> mysql> CHANGE MASTER TO
>     ->     MASTER_HOST='master_host_name',
>     ->     MASTER_USER='replication_user_name',
>     ->     MASTER_PASSWORD='replication_password',
>     ->     MASTER_LOG_FILE='mysql-bin.003',
>     ->     MASTER_LOG_POS=73;
> (replace this values with the result of "show master status command" )
> 
> mysql>START SLAVE;
> 
> done
> 
> Anyway I recommend you to check
> http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html it is a
> really
> good guide.
> 
> Bye.
> 
> On 21/11/2007, FMGreen <florinda.green@stripped> wrote:
>>
>> Hi there,
>> I have inherited two Redhat replicated servers running a helpdesk app
>> (the
>> person who set them up has left the company) and replication has
> broken.  I
>> know next to nothing about mysql/replication so am in need of help.  The
>> problem seemed to originate with a crash which caused a duplicate entry
> into
>> the db.  Anyway, I have restored the db on each server (using the same
>> mysqldump) so they should be identical.  The restore is from Nov
> 14th.  What
>> is confusing me is that when I do 'show slave status' it gives an error
>> in
>> the database with a 'ticket create date' (as I said, it's a helpdesk
> system)
>> of Nov 16th - 2 days later than my restore.  It's as if replication is
>> picking up a cached version of the original database rather than using
>> the
>> restored version.  I'm a newbie so if anyone could shed some light on
>> what
>> is happening it would be much appreciated.  Many thanks!
>> --
>> View this message in context:
>
> http://www.nabble.com/replication-on-Linux-broken-after-db-restore-tf4850053.html#a13876896
>> Sent from the MySQL - Replication mailing list archive at Nabble.com.
>>
>>
>> --
>> MySQL Replication Mailing List
>> For list archives: http://lists.mysql.com/replication
>> To unsubscribe:
> http://lists.mysql.com/replication?unsub=1
>>
>>
> 
> 

-- 
View this message in context:
http://www.nabble.com/replication-on-Linux-broken-after-db-restore-tf4850053.html#a13909036
Sent from the MySQL - Replication mailing list archive at Nabble.com.

Thread
replication on Linux broken after db restoreFMGreen21 Nov
  • Re: replication on Linux broken after db restoremartín arrieta21 Nov
    • Re: replication on Linux broken after db restoreFMGreen23 Nov
      • Re: replication on Linux broken after db restoreJan Bruvoll23 Nov
      • Re: replication on Linux broken after db restoreMarcus Bointon23 Nov
        • Re: replication on Linux broken after db restoreFMGreen23 Nov
    • Re: replication on Linux broken after db restoreFMGreen23 Nov
  • Re: replication on Linux broken after db restoreChristian Schramm21 Nov
    • Re: replication on Linux broken after db restoreFMGreen22 Nov
      • Re: replication on Linux broken after db restoreChristian Schramm22 Nov