Leo
Leo

Reputation: 41

Setting mysql auto_increment_offset and auto_increment_increment per database or per table basis?

Is it possible to set mysql auto_increment_offset and auto_increment_increment per database or per table basis?

Upvotes: 4

Views: 2471

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117216

Its database not per table.

If the global value of auto_increment_offset variable is set, its persist until the global value is changed or overridden by setting the session value, or until mysqld is restarted. If the local value is set, the new value affects AUTO_INCREMENT columns for all tables into which new rows are inserted by the current user for the duration of the session, unless the values are changed during that session.

from here: http://dev.mysql.com/doc/refman/5.1/en/replication-options-master.html#sysvar_auto_increment_increment

Upvotes: 2

Related Questions