Blah. Stupid MySQL replication...
Apr. 12th, 2007 11:39 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
The two servers I manage run two different versions of MySQL. The newer one acting as the slave of the older one. This is our crappy backup + prep to move to newer server...
the replication error was an odd one: the command apparently ran on the master side without an error, but ran perfectly on the slave side. As a result, the slave side expected... an error. Which I can't exactly replicate, really. And I didn't know how to skip over that transaction. Soo.... Ugh.
Anyhow, just logging what I did to fix it. It's the worst possible way to go about it, I'm sure. XP. Ended up running:
on the master side
and then trashing all of the databases on the slave side, doing
mysql> stop slave;
mysql> load data from master;
mysql> source master.sql;
mysql> start slave;
...of course, I tried a lot of other things before that, so uh... it may have been a combination of all the other stuff. :P
the replication error was an odd one: the command apparently ran on the master side without an error, but ran perfectly on the slave side. As a result, the slave side expected... an error. Which I can't exactly replicate, really. And I didn't know how to skip over that transaction. Soo.... Ugh.
Anyhow, just logging what I did to fix it. It's the worst possible way to go about it, I'm sure. XP. Ended up running:
mysqldump -A -F --master-data -f -e --opt -u root --password=******* --result-file=master.sql
on the master side
and then trashing all of the databases on the slave side, doing
mysql> stop slave;
mysql> load data from master;
mysql> source master.sql;
mysql> start slave;
...of course, I tried a lot of other things before that, so uh... it may have been a combination of all the other stuff. :P