MySQL replication – Query caused different errors on master and slave

MySQL replication works quite reliable most of the time. But from time to time, especially if you change network, servers or the master has gone away the slave will get in a “weird” state. Today, I’ve encountered the following error message on one of the slaves;
Query caused different errors on master and slave
All tries to work around the error did not resolve it. Most of the “solutions” on the net were pointing out that one should do a “reset slave” and then grab the new log files from the master. While this “could” work, I was not in for that, since it would have meant to put the master into “read” and dumping the databases. Something that was out of the question on a production system (at least outside of a maintenance window).
But I’ve remembered that there is some setting in order to skip errors and continue with the sync. In my case, the errors on the salve were trivial as they have been caused by temporary tables and columns. So, in order to get the replication going again I issued the following:
[code]stop slave;[/code]
(This will obviously stop the slave)
[code]SET GLOBAL sql_slave_skip_counter = 1;[/code]
(resetting the skip/error by 1)
[code]start slave;[/code]
(This will obviously start the slave)
[code]show slave status;[/code]
(checking if the replication could continue)
In my case, I’ve had three more errors. In order to get it working 100% again, I just repeated the steps above until there were no errors anymore in the status query.
I hope this helps anyone out there.

MySQL: Failed to open the relay log
If you happen to see the message "Failed to open the relay log..." in your MySQL error log file (sometimes it is good to look into it once in a while) then you either have your replication setup incorrectly or you forgot to remove the salve information in the master.…

Fix for running MySQL 5.5.8 under MacOS X 10.6.5 (Snow Leopard)
Oracle recently released the latest MySQL 5.5.x versions. Despite of having tones of fixes and supposedly running much faster and (finally) making InnoDB the default storage engine, it is always good to keep up to date with latest releases. But, as in the past, MaxOS X users always have to…

ImageMagick and Ghostscript playing nice with web applications
I had to spent way too much time the last time to set up ImageMagick and Ghostscript together that I simply jump right in so you don't have to waste time on this, like I did. Creating thumbnails and images from a PDF is one of the most used features…

CFML and Cannot run program "chmod": java.io.IOException: error=24, Too many open files
Migrating one of my customers the other day, bought up an ugly error when I had to create 2000 directories on one go. The error was: [code]Cannot run program "chmod": java.io.IOException: error=24, Too many open files[/code] While, "too many open files" usually means one can raise the limit of open…

Updating Confluence and Jira is a nightmare and keeps you hunting for solutions
First off, I really like Jira and Confluence and we have been using them successfully for all our open source applications. We also use HipChat for our IM communication and use SourceTree for managing code on Github. Just realised that Atlassian has become a company to depend on... This post…

Switching from brew to nvm for node install
Many people use a simple "brew install node" to get node running on their machines. However, today I discovered that all global node modules could not be updated properly. I got errors like: [code]npm ERR! error rolling back Error: Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm npm ERR! error rolling…