From 51a197f5fec21feb5c2df7bb5679fab5f38ab930 Mon Sep 17 00:00:00 2001 From: ieayoio Date: Wed, 31 Jul 2024 10:53:55 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=B8=BB=E4=B8=BB=E5=90=8C?= =?UTF-8?q?=E6=AD=A5master2=20auto-increment-offset=20=E5=BA=94=E4=B8=BA2?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E8=87=AA=E5=A2=9E=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...70\273\345\220\214\346\255\245\345\244\215\345\210\266.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/mysql/MySQL\344\270\273\344\270\273\345\220\214\346\255\245\345\244\215\345\210\266.md" "b/mysql/MySQL\344\270\273\344\270\273\345\220\214\346\255\245\345\244\215\345\210\266.md" index 1dd593e..456e64b 100644 --- "a/mysql/MySQL\344\270\273\344\270\273\345\220\214\346\255\245\345\244\215\345\210\266.md" +++ "b/mysql/MySQL\344\270\273\344\270\273\345\220\214\346\255\245\345\244\215\345\210\266.md" @@ -49,7 +49,7 @@ binlog-ignore-db = mysql #忽略同步的数据库 log-slave-updates #把从库的写操作记录到binlog中 (缺少之后,双主创建失败) expire_logs_days = 365 #日志文件过期天数,默认是 0,表示不过期 auto-increment-increment= 2 #设定为主服务器的数量,防止auto_increment字段重复 -auto-increment-offset = 1 #自增长字段的初始值,在多台master环境下,不会出现自增长ID重复 +auto-increment-offset = 2 #自增长字段的初始值,在多台master环境下,不会出现自增长ID重复 ``` ##### 创建帐号密码并授权 @@ -231,4 +231,4 @@ mysql> select * from employee; | 7 | d | +----+------+ 4 rows in set (0.00 sec) - ``` \ No newline at end of file + ```