码迷,mamicode.com
首页 > 其他好文 > 详细

LeetCode: Length of Last Word [057]

时间:2014-05-25 07:39:05      阅读:256      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   c   code   tar   

昨天同事在做主从时,从库报如下错误:

Got fatal error 1236 from master when reading data from binary log: ‘Misconfigured master - server id was not set‘

粗粗看好像是master的server-id没有设置,但同事做如下查询:

备库采集:
root@localhost Fri May 23 14:18:59 2014 14:18:59 [(none)]> show variables like ‘%server_id%‘;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id     | 2     | 
+---------------+-------+

主库采集:

mysql> show variables like ‘%server%‘;
+----------------------+-------------------+
| Variable_name        | Value             |
+----------------------+-------------------+
| character_set_server | latin1            |
| collation_server     | latin1_swedish_ci |
| server_id            | 1                 |
+----------------------+-------------------+

此时,复制环境的server-id确实是全局唯一的。为何报错?

由于业务是用于存储hadoop的元数据,之前MySQL版本较低,同事用了比master版本高的slave,本以为是这个原因,但在MySQL 的bug列表上发现: 

该发现否定了我们之前的判断,经过同事那边的测试,也确实是这个bug :-)


祝周末愉快,

Good Luck!


LeetCode: Length of Last Word [057],布布扣,bubuko.com

LeetCode: Length of Last Word [057]

标签:style   class   blog   c   code   tar   

原文地址:http://blog.csdn.net/harryhuang1990/article/details/26811823

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!