mysql 基础-搭建的两台从库server-id相同,会出现什么情况?搭建的主库和从库server-id相同,又会出现什么情况?
2012-08-19 15:01
597 查看
主从相同时 ,出现从库不能io线程不能同步,show slave status:
Fatal error: The slave I/O thread stops because master and slavehave equal MySQL server ids; these ids must be different for replication to work(or the --replicate-same-server-id option must be used on slave but this doesnot always make sense; please check
the manual before using it).
正如上面所说,可以配置--replicate-same-server-id,但是如果配置这个选项就不能配置--slave-log-updates,因为这样可能会导致内循环,如下:
using --replicate-same-server-id in conjunction with--log-slave-updates is impossible, it would lead to infinite loops in thisserver.
从和从相同:
从服务器的io线程总是在这个之间切换,两个从库的io线程轮流争抢主库连接。
Queueing master event to the relay log和 Waiting toreconnect after a failed master event read。
错误日志中循环出现
120810 16:12:53 [Note] Slave: received end packet from server,apparent master shutdown:
120810 16:12:53 [Note] Slave I/O thread: Failed reading log event,reconnecting to retry, log 'mysql-bin.000023' at postion 537
[c1]直接说:主从相同时从库同步会停止,然后再列出错误日志,否则回答的没有重点
[c2]哪个?直接回答:两个从库的io线程会争抢id,交互断开,注意提炼
Fatal error: The slave I/O thread stops because master and slavehave equal MySQL server ids; these ids must be different for replication to work(or the --replicate-same-server-id option must be used on slave but this doesnot always make sense; please check
the manual before using it).
正如上面所说,可以配置--replicate-same-server-id,但是如果配置这个选项就不能配置--slave-log-updates,因为这样可能会导致内循环,如下:
using --replicate-same-server-id in conjunction with--log-slave-updates is impossible, it would lead to infinite loops in thisserver.
从和从相同:
从服务器的io线程总是在这个之间切换,两个从库的io线程轮流争抢主库连接。
Queueing master event to the relay log和 Waiting toreconnect after a failed master event read。
错误日志中循环出现
120810 16:12:53 [Note] Slave: received end packet from server,apparent master shutdown:
120810 16:12:53 [Note] Slave I/O thread: Failed reading log event,reconnecting to retry, log 'mysql-bin.000023' at postion 537
[c1]直接说:主从相同时从库同步会停止,然后再列出错误日志,否则回答的没有重点
[c2]哪个?直接回答:两个从库的io线程会争抢id,交互断开,注意提炼
相关文章推荐
- 两台计算机有相同的IP地址会发生什么情况?两台计算机有相同的MAC地址会发生什么情况?
- [转]Android试验:如果View的ID相同会出现什么效果?
- mysql由于server-id相同而造成同步失败
- MySQL主库已经存在的基础上搭建从库的过程--> (旧资料整理)
- [转]Android试验:如果View的ID相同会出现什么效果?
- [转]Android试验:如果View的ID相同会出现什么效果?
- MySQL主库已经存在的基础上搭建从库的过程
- 使用docker 搭建基础的 mysql 应用
- poi导出execl的时候,如果不点击保存或其他按钮,会出现什么情况?
- 一个httpclient4实例跨域访问会报错,谁知道在什么情况下会出现这个问题?
- 基于 PHP & MySQL 搭建OAuth Server
- SQlyog是mySQl的UGI版,默认情况下中文显示会出现乱码
- 基于 PHP & MySQL 搭建OAuth Server
- 【MySQL】MySQL无基础学习和入门之一:数据库基础概述和实验环境搭建
- 基于springboot+redis+bootstrap+mysql开发一套属于自己的分布式springcloud云权限架构(十七)【权限架构系统(基础框架搭建)】
- VS2010里调试有时候会出现预编译头通不过的现象,那按一下F7调试,看看什么情况。
- Centos7 搭建mysql-community-server
- MySQL是什么玩意儿(二)MySQL中的SQL语法基础 分类: MySQL 2014-04-26 10:16 173人阅读 评论(0) 收藏
- 什么情况会出现“executeUpdate, Exception = null”这样的错误?