Failed to read auto-increment value from storage engine, Error Number: 1467

后端 未结 9 872
[愿得一人]
[愿得一人] 2020-12-16 02:54

When inserting data in mysql i get this error:

Error Number: 1467 Failed to read auto-increment value from storage engine

I don\'t now how to solve this i

相关标签:
9条回答
  • 2020-12-16 03:38

    After some searching i found the answer and it solved my problem.

    run this sql query it will fix the problem

     ALTER TABLE `YOUR_TABLE`  AUTO_INCREMENT =1
    
    0 讨论(0)
  • 2020-12-16 03:47

    I had the same problem, after changing ID column to id, and after exporting my db, so I just switched the column back to ID and then back to id again, and every thing worked fine after. Working with elequent orm in laravel, it expects column id and I had column ID, that is why I changed it in the first place

    0 讨论(0)
  • 2020-12-16 03:52

    Another possibility with this error is that you've hit the max value in the ID field (generally an INT). We had this error when our ID values got close to 4294967295. We ended up having to drop the ID from the table in order to get past the issue. The various INT fields are mentioned in this answer: https://stackoverflow.com/a/5634147/4573630

    0 讨论(0)
提交回复
热议问题