2

I want to change auto_increment value in mysql. Right now it's 10. I have gone through this question in stackoverflow.

I tried with

SET @@auto_increment_increment=1;

But when I checked that variable by show variable command then my result was like,

SHOW VARIABLES LIKE 'auto_inc%';

+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| auto_increment_increment | 10    |
| auto_increment_offset    | 1     |
+--------------------------+-------+

I am running my server on windows azure. Is that any problem with that?

Community
  • 1
  • 1
user3609998
  • 73
  • 1
  • 1
  • 8
  • Possible duplicate of [How to reset AUTO\_INCREMENT in MySQL?](http://stackoverflow.com/questions/8923114/how-to-reset-auto-increment-in-mysql) – Matthew Leffler Nov 29 '16 at 00:54

1 Answers1

3

Try executing this

SET GLOBAL auto_increment_increment =1;

You can also set it on table level

ALTER TABLE yourtable AUTO_INCREMENT = 1;
Mad Dog Tannen
  • 7,129
  • 5
  • 31
  • 55