auto increment not starting from 1
12,753
Solution 1
If you really want to reset this, in phpMyAdmin, open this table, go to Operations and change the value for AUTO_INCREMENT.
Solution 2
ALTER TABLE tablename AUTO_INCREMENT = 1
This will reset your auto increment to start from 1
Solution 3
You can reset your auto increment ID from the following Command:
ALTER TABLE TABLE_NAME AUTO_INCREMENT = 1;
This will start from 1.
OR
go to LOCALHOST/PHPMYADMIN enter:
select your DB
after choose the specific table than go to Operations an set a number to the Auto increment.
Author by
Lmxc
Updated on June 04, 2022Comments
-
Lmxc over 1 year
I am inserting some data to a database and I have an id column which has auto increment. I updated my xampp server yesterday and now the auto increment is starting from 4, 3, 5 in different tables. It used to work fine before. I did not delete any rows from the table it just starts from those numbers. What is wrong?
-
Sahnosh Rahguzar over 7 yearsAlso use this: DELETE FROM table; ALTER TABLE table AUTO_INCREMENT = 1;
-
Marc Delisle almost 5 yearsPlease give more details: table's structure, MySQL version.
-
proofzy almost 5 yearswow I'm in touch with phpmyadmin creator :D It's doesn't metter anyway