AUTO_INCREMENT
和LAST_INSERT_ID
等。以下是一个简单的MySQL主主复制配置示例:
-- 主节点1配置
server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = mydatabase
-- 主节点2配置
server-id = 2
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = mydatabase
-- 从节点配置
server-id = 3
relay_log = /var/log/mysql/mysql-relay-bin.log
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = mydatabase
希望这些信息对你有所帮助!如果你有更多问题,欢迎继续提问。
领取专属 10元无门槛券
手把手带您无忧上云