Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2764811
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类:

2010-01-21 17:31:29

 
在学习replication时遇到了如下问题:
 
显然看到Slave_IO_Running 为NO 表示有问题;
到日志里查看,错误如下:
 

position 98
100121 17:09:03 [ERROR] The slave I/O thread stops because master and slave have 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 does not always make sense; please check the manual before using it).
100121 17:09:03 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.000007', position 98

怀疑是server-id的原因。

于是如图:

显然, 42和88行都定义了server-id。 于是注释了88行。
操作 vi /etc/my.cnf,找到第88行, 将server-id注释掉
如图:


再次查询/etc/my.cnf

然后重启mysqld服务,service mysqld restart  问题即可解决
如下显示就表示正常:
留为笔记之用!
阅读(1717) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~