---
title: "设置MySQL自动增长起点和步长"
author: "mesum"
date: "2012-11-20T14:03:37Z"
tags: []
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2012-11-20T14:03:37Z"
id: 1730576
url: "https://mesum.iteye.com/blog/1730576"
---

mysql&gt; SET @auto\_increment\_increment=10;  
                      

mysql&gt; SHOW VARIABLES LIKE 'auto\_inc%';  
                       +--------------------------+-------+  
                       | Variable\_name            | Value |  
                       +--------------------------+-------+  
                       | auto\_increment\_increment | 10    |  
                       | auto\_increment\_offset    | 1     |  
                       +--------------------------+-------+  
                      2 rows in set (0.01 sec)