PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 13, 2022

[FIXED] MySQL auto_increment not reseting (stuck on increment by 10)

 January 13, 2022     mysql, php, phpmyadmin     No comments   

Issue

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


Solution

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.



Answered By - Marc Delisle
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing