MySQL replication – Query caused different errors on master and slave

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.

Helpmonks All-in-one Customer Service Platform
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.…

Helpmonks All-in-one Customer Service Platform
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…

Helpmonks All-in-one Customer Service Platform
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…

Helpmonks All-in-one Customer Service Platform
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…

Helpmonks All-in-one Customer Service Platform
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…

Helpmonks All-in-one Customer Service Platform
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…

Trusted by over 2,000 organizations with millions of emails

Helpmonks helps us answer customer emails at lighting speed
We couldn't do our job without Helpmonks!
Helpmonks, the best thing since sliced bread
Excellent option for collaborating email amongst your team
A good platform that is here to grow and help you grow
Helpmonks is a great tool that our company utilizes and depends on
Great shared inbox for the team
Fantastic email support service for any business
Easy to navigate and catalog data for specific users
Solid Helpdesk software w/ responsive customer support
A really good solution to manage customer support mailbox
Good support, useful features

One more thing...

Helpmonks gives you the ability tocollaborate as a groupin your shared mailbox, features aTeam To-Do App, powerfulCustomer Relationship Management (CRM)capabilities, a completeLive-Chat tool, a mighty Email Marketing Platform that includes sending ofemail campaignsandemail automation, collision detection, email tracking, reminders, mentions, custom fields, custom applications, customer satisfaction ratings, Single-Sign-On (SSO) & SAML authentication, Trello, Zapier, Slack, an API, and much more.

Check outthe complete feature listor sign up for afree 30-day shared inbox trial now