【Mysql】自增步长调整,自增mysql> show variables like '%increment%';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| auto_increment_increment | 2 |
| auto_increment_offset | 1 |
| div_precision_increment | 4 |
| innodb_autoextend_increment | 64 |
+-----------------------------+-------+
4 rows in set (0.03 sec)
mysql> set @@global.auto_increment_increment = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%increment%';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| auto_increment_increment | 2 |
| auto_increment_offset | 1 |
| div_precision_increment | 4 |
| innodb_autoextend_increment | 64 |
+-----------------------------+-------+
4 rows in set (0.07 sec)
mysql> set @@auto_increment_increment =1;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> show variables like '%increment%';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| div_precision_increment | 4 |
| innodb_autoextend_increment | 64 |
+-----------------------------+-------+
4 rows in set (0.04 sec)
http://www.dengb.com/Mysql/1375395.htmlwww.dengb.comtruehttp://www.dengb.com/Mysql/1375395.htmlTechArticle【Mysql】自增步长调整,自增 mysql show variables like %increment%;+-----------------------------+-------+| Variable_name | Value |+-----------------------------+-------+...