Primary Key Auto-Increment and Replication

Recently, I was told to add the auto_increment primary key to all our tables, because our database will be replicated (master-master solution). All our tables had some kind of primary key, but not all of them were auto-incrementing.

I looked at the mysql documentation about replication, and I did not find any indication that this (auto_increment primary key) is required. So, am I missing something? Is it better to have auto-increment primary keys when the database is replicated?

+3
source share
1 answer

, , . , . , A 1 , 1, , , , .

auto_increment_increment auto_increment_offset, .

, , , ( ) . .

, - , MySQL. , .

+4

Source: https://habr.com/ru/post/1718477/


All Articles