Replication and Binary Logging Options and Variables When the value of  auto_increment_offset  is greater than that of auto_increment_increment , the value of  auto_increment_offset  is ignored. 4 rows in set (0.02 sec) If either of these variables is changed, and then new rows inserted into a table containing an  AUTO_INCREMENT  column, the results may seem counterintuitive because the series of AUTO_INCREMENT  values is calculated without regard to any values already present in the column, and the next value inserted is the least value in the series that is greater than the maximum existing value in the  AUTO_INCREMENT  column. The series is calculated like this: auto_increment_offset  +  N  ×  auto_increment_increment where  N  is a positive integer value in the series [1, 2, 3, ...]. For example: The values shown for  auto_increment_increment  and  auto_increment_offset  generate the series 5 +  N  × 10, that is, [5, 15, 25, 35, 45, ...]. The highest value present in the  col  column prior to the INSERT  is 31, and the next available value in the  AUTO_INCREMENT  series is 35, so the inserted values for  col  begin at that point and the results are as shown for the  SELECT  query. It is not possible to restrict the effects of these two variables to a single table; these variables control the behavior of all  AUTO_INCREMENT  columns in  all  tables on the MySQL server. If the global value of either variable is set, its effects persist until the global value is changed or overridden by setting the session 3499 mysql>  SHOW VARIABLES LIKE ’auto_inc%’; 2 rows in set (0.00 sec) +--------------------------+-------+ | Variable_name | Value | +--------------------------+-------+ | auto_increment_increment | 10 | | auto_increment_offset | 5 | +--------------------------+-------+ mysql>  SELECT col FROM autoinc1; +-----+ | col | +-----+ | 1 | | 11 | | 21 | | 31 | +-----+ 4 rows in set (0.00 sec) mysql>  INSERT INTO autoinc1 VALUES (NULL), (NULL), (NULL), (NULL); Query OK, 4 rows affected (0.00 sec) Records: 4 Duplicates: 0 Warnings: 0 mysql>  SELECT col FROM autoinc1; +-----+ | col | +-----+ | 1 | | 11 | | 21 | | 31 | | 35 | | 45 | | 55 | | 65 | +-----+ 8 rows in set (0.00 sec)