digdeep

凡是过去,皆是序幕。Read the fucking manual and source code.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

使用 gh-ost 对表在线加索引时,第一次发生了下面的报错(使用gh-ost很长时间了,第一次遇到这个报错):

[2023/12/12 11:48:08] [error] binlogstreamer.go:77 close sync with err: ERROR 1236 (HY000): A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.061382' at 4, the last event read from './mysql-bin.061382' at 230229886, the last byte read from './mysql-bin.061382' at 230229886.

报错说是 和其中的一个slave 发生了 server_uuid 冲突了。

查看帮助:

gh-ost -h | grep server

 

 看到了一个参数 -replica-server-id=xxxx 可以指定 gh-ost使用的server-id,gh-ost 默认的server-id 是 99999.

加上该参数后正常。

posted on 2023-12-12 11:59  digdeep  阅读(48)  评论(0编辑  收藏  举报
不懂数据库和Web安全的架构师不是一个好的程序员。