One Main reason for this is some reference table is still incrementing vaules but the main table would have been gone ahead increment.and hence the mapping between the tables have gone haywire.
So to fix this it is necessary to reset our tables AutoIncrement(auto-index) Values.
ALTER TABLE table_name AUTO_INCREMENT = start_value
If you want to start a increment from value 100 then query is as
ALTER TABLE table_name AUTO_INCREMENT = 100
Incase you want have cleared all the data from the table , and want the table to start the increment from 1,
TRUNCATE TABLE table_name
When TRUNCATE is fired if there are any existing triggers of ON DELETE will not be fired