On Tue, 12 Jun 2007, Ian P. Christian wrote:

> Ian P. Christian wrote:
> > I upgraded my slave server a few weeks ago, and the slave failed, with
> > an error similar to the one shown below.
> 
> 
> I have figured out what happened here now - and I'm part of the way
> though fixing it.....
> 
> It turned out the defaults had changed somewhere, and rather then using
> /var/lib/mysql/<hostname>-bin, it was using /var/run/mysql/mysqld-bin
> (and the same change fro relay logs too).

I think you've just discovered why non-packaged distributions have 
no place in production environment. Compiling things with defaults and 
expecting it to work the same is asking for trouble most of the time.

> Now... I've changed the slave to use it's correct logs now - however, if
> I do the same on the master, I'll have the last 4 hours of logs in
> /var/run/mysql/mysqld-bin ignored.
> 
> Somehow, I need to get the slave to catch up with the master's old logs
> in /var/lib/mysql/<hostname>-bin, and then continue from the brand new
> logs in /var/run/mysql/mysqld-bin
> 
> This is an awful mess, and I'm not sure it's recoverable - perhaps it is.
> 
> In theory, I should be able to find out where the slave was up to in the
> old logs, extract them manually and replay them on the slave, and then
> reset the slave to use the new logs - however i'm not sure how reliable
> that's going to be - or even how to go about doing it yet.
> 
> Ideas anyone?

Has the slave started replicating from the new logs? If it has, you'll 
find it will be quicker to re-seed the slave - even if it takes a day or 
two. The only difference will be that in one case the slave will catch up 
on it's own, and in the other, you'll also lose a day or two of your time 
trawling through the logs manually trying to re-construct the data.

If it hasn't, you can probably change the big-log sequencing numbers and 
change the pointers to file names and offsets in the index files on the 
master and the slave, and hope for the best. With some luck, it'll work, 
but I wouldn't count on it.

Gordan


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to