Solved

mysqlbinlog error

Posted on 2006-10-26
4
420 Views
Last Modified: 2008-01-09
I'm currently in the process of setting up MySQL replication, but haven't set it up on the main server as I want to upgrade to MySQL 4.1.x and am troubleshooting some slow query issues from upgrading from 3.23 to 4.1.x.  In the meantime, I am manually transferring the MySQL binlogs from the master to slave server and using the mysqlbinlog utility.

I recently did some cleanup of redundant indexes on various tables on the master and slave server, but didn't take into account that I should've only done that on the master server.

When I was importing the mysql binlog to the slave server I got the following error:

ERROR 1091 (42000) at line 371714: Can't DROP 'couponID_2'; check that column/key exists

Does that mean that after line 371714, no other SQL statements were read in?
0
Comment
Question by:ftsao
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:chigs20
ID: 17812863
yes, the mysqlbinglog does stop after an error is produced.  What you'll need to do is add the force option
mysqlbinlog --force-read

--force-read, -f
With this option, if mysqlbinlog reads a binary log event that it does not recognize, it prints a warning, ignores the event, and continues. Without this option, mysqlbinlog stops if it reads such an event.

Depending on the size of your db, you may want to use mysqldump to transfer the data from the master to slave. Then both db's will be sync'd and you won't have to worry about binlogs as they can be fickle.
0
 
LVL 4

Author Comment

by:ftsao
ID: 17813323
Just to clarify, would the statements before the error encountered be executed?
0
 
LVL 6

Accepted Solution

by:
chigs20 earned 125 total points
ID: 17814518
That's a good question and I didn't find anything in the mysql docs.  You could use an editor to look at the first query in a binlog, execute the binlog then query on the db so see if it was executed...
But again, I stress the use of mysqldump as it's much easier and is readable text unlike the binlogs.

0
 
LVL 4

Author Comment

by:ftsao
ID: 17814821
Looks like it executes the SQL statements until it encounters an error or processes all statments successfully. Thanks.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now