Frank Tsao
asked on
mysqlbinlog error
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?
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?
ASKER
Just to clarify, would the statements before the error encountered be executed?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Looks like it executes the SQL statements until it encounters an error or processes all statments successfully. Thanks.
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.