2

what can trigger an auto-increment reset on mysql table other than :

  • restart mysql service
  • truncate table

can any one help me understand this behavior ?

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • Did the data in the table disappear? – RiggsFolly Jun 15 '17 at 14:53
  • This would https://stackoverflow.com/questions/970597/change-auto-increment-starting-number – RiggsFolly Jun 15 '17 at 14:57
  • 1
    restart mysql service will not trigger a auto-increment reset on a table(s) – Raymond Nijland Jun 15 '17 at 14:59
  • What storage engine are you using (InnoDB, MyISAM, other)? Can you provide more details of your case?. – wchiquito Jun 15 '17 at 18:32
  • 1
    i use an InnoDB engine , in fact i have a table which i purge every night and normally the auto-increment value is preserved but i noticed that from time to time its happen that auto-increment value is reset to 1 . ps : for the purge i use a delete query not a trucate –  Jun 16 '17 at 11:15
  • @Mouad.bll Did you solve this problem? I run into a familiar problem https://stackoverflow.com/questions/55512290/auto-increment-has-been-reset-back-to-1-automatically – Jan Krupa Apr 04 '19 at 09:58

0 Answers0