Home > Database > Mysql Tutorial > mysql implements self-increasing step size adjustment

mysql implements self-increasing step size adjustment

王林
Release: 2020-01-27 21:26:12
forward
3478 people have browsed it

mysql implements self-increasing step size adjustment

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

show variables like '%increment%';
Copy after login

If:

auto_increment_increment=2
Copy after login

(free learning video tutorial recommendation: mysql video tutorial )

then execute:

set @@global.auto_increment_increment = 1; 
set @@auto_increment_increment =1;
Copy after login

If:

auto_increment_offset=2
Copy after login

then execute:

set @@global.auto_increment_offset =1;
set @@auto_increment_offset =1;
Copy after login

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!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template