Reputation: 45
So running MySQL Version 5.5.42-cll
My tables wherever auto_increment
are refusing to reset, they're all incremented by 10 and not by 1.
Tried changing it in phpmyadmin and no luck.
Tried following statement but it didn't work:
ALTER TABLE tablename AUTO_INCREMENT = 1;
Has anyone had this issue before? I can't truncate the tables as they have a lot of data, I also know that the +10 probably isn't a big deal, but I expect these tables to get large and would rather keep the numbers low and clean.
Any help would be great please
Upvotes: 0
Views: 580
Reputation: 170
Old post, but still useful to know. You should not be changing this value, most DBs have a reason for increasing by 10, and it could lead to future issues if you make this change. For more info, check out this post
Upvotes: 0
Reputation: 9012
In phpMyAdmin, log in as a privileged user, go to home page, Variables, type "increment". Then for "auto increment increment", click on Edit, set it to the value you wish (1) and Save.
Upvotes: 1
Reputation: 2451
Might be the auto_increment_increment
variable. Try this to reset the increment of auto_increment with:
SET @@auto_increment_increment=1;
from MySQL autoincrement column jumps by 10- why?
Upvotes: 2