2

I'm getting a strange issue on my database.

All auto increment fields of my database (all tables) are getting increment by 10.

Previously it was working fine (increment by 1). And now its started to increment by 10.

Table 1

table 1

Another table

table 2

Dino Babu
  • 5,814
  • 3
  • 24
  • 33

3 Answers3

3

Set the auto_increment_increment system variable to 1.

SET @@auto_increment_increment=1
SET GLOBAL auto_increment_increment=1;
juergen d
  • 201,996
  • 37
  • 293
  • 362
0

It's Something like that :

SET @@auto_increment_increment=1;

or for specific table :

ALTER TABLE users AUTO_INCREMENT =1;

Or you can refer w3school

Java Curious ღ
  • 3,622
  • 8
  • 39
  • 63
0

Yes you may set the auto_increment_increment variable to 1

SET @@auto_increment_increment=1

SET GLOBAL auto_increment_increment=1;

in mysql it will work definitely.

Jitendra Pareek
  • 627
  • 7
  • 28