mysql Failed to read auto-increment value from storage engine

ashu picture ashu · Sep 8, 2011 · Viewed 51.8k times · Source

I am having mysql table with one id field as auto-increment .

When I insert values to the table am getting error as

1467 - Failed to read auto-increment value from storage engine

Also the show table status shows me that the field with auto increment has

18446744073709551615 as Auto_increment value.

What would be the issue can any one help me ....?

Answer

Alex Rashkov picture Alex Rashkov · Jun 5, 2013

I had the same error but in my case I had about 1.5k records in the table. I fixed it by resetting the AUTO INCREMEN like that:

ALTER TABLE `table_name`  AUTO_INCREMENT = 1