mysql 主从配置,UUID重复了,配置里server_id是不一样的。。。

clipboard.png

because master and slave have equal MySQL server UUIDs

master配置:

[client]
port=3306
default-character-set=utf8

[mysqld]
port = 3306
innodb_buffer_pool_size = 128M
character_set_server=utf8
server_id=488
basedir=D:/software/SalamanderWnmp/mysql
#解压目录
datadir=D:/software/SalamanderWnmp/mysql/data
#解压目录下data目录
max_allowed_packet = 10M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

log-bin=D:/software/SalamanderWnmp/mysql/mysql-bin

slave配置:

[client]
port=3306
default-character-set=utf8


[mysqld]
port=3308
innodb_buffer_pool_size = 128M
character_set_server=utf8
server_id=499
basedir=D:/software/SalamanderWnmp/mysql-slave
#解压目录
datadir=D:/software/SalamanderWnmp/mysql-slave/data
#解压目录下data目录
max_allowed_packet = 10M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

replicate-do-db=jiyin
log-bin=D:/software/SalamanderWnmp/mysql-slave/mysql-relay-bin
log_slave_updates=1
read_only=1

发现了data目录中auto.cnf中生成的UUID是一样的,但是是为什么呢?^_^

clipboard.png

clipboard.png

阅读 5.1k
1 个回答

改成不一样就好了,改完重启一下,你两个实例是复制出来的吧?要不然不会一样的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题