I am encountering a strange issue when using mysqldbcompare to compare two MySQL DBs(one is a master, the other its slave). I noticed that the tool notes that the AUTO_INCREMENT values of this specific table are different for both DBs. However, the table contents are exactly the same for this table in both DBs (i.e. no missing records, and the primary key id of the last record in the table for each DB is the same! ), which is very strange.

What would cause the AUTO_INCREMENT values to be different then? Is it something that has to do with replication or is it caused by mysqldbcompare when it is running the comparison?

This is the output for that specific table from mysqldbcompare :

# TABLE     special_table                            FAIL    pass    -       
#           - Compare table checksum                                FAIL    
#           - Find row differences                                  pass    
# Transformation for --changes-for=server1:

ALTER TABLE `production`.`special_table`
  DROP INDEX index_id_device_id,
  ADD UNIQUE INDEX index_id_device_id (index_id,device_id),


  • Statement, row or mixed replication? – ypercubeᵀᴹ Dec 3 '14 at 20:31
  • It is a statement-based replication on all boxes – user1805458 Dec 4 '14 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.