Home  >  Article  >  Database  >  mysql implements self-increasing step size adjustment

mysql implements self-increasing step size adjustment

王林
王林forward
2020-01-27 21:26:123431browse

mysql implements self-increasing step size adjustment

First execute the command and view the configuration, as follows:

show variables like '%increment%';

If:

auto_increment_increment=2

(free learning video tutorial recommendation: mysql video tutorial )

then execute:

set @@global.auto_increment_increment = 1; 
set @@auto_increment_increment =1;

If:

auto_increment_offset=2

then execute:

set @@global.auto_increment_offset =1;
set @@auto_increment_offset =1;

Related article tutorial recommendation: mysql tutorial

The above is the detailed content of mysql implements self-increasing step size adjustment. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete