Home  >  Article  >  Database  >  MySQL由于server-id相同造成的同步失败恢复

MySQL由于server-id相同造成的同步失败恢复

WBOY
WBOYOriginal
2016-06-07 16:53:551273browse

发现一台从库的MySQL同步停了,用show slave status\G查看Slave_IO_Running: No。启动slave也不成功,也没看到错误号。后来查mys

发现一台从库的MySQL同步停了,

用show slave status\G查看Slave_IO_Running: No。启动slave也不成功,,也没看到错误号。后来查mysql的error日志有如下报错:

090216 21:06:10 [Note] Slave: received end packet from server, apparent master shutdown:

090216 21:06:10 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.0444' position 77911

090216 21:06:11 [Note] Slave: connected to master 'rsync@10.10.10.10:3306',replication resumed in log 'mysql-bin.0444' at position 77911

用以前的办法弄半天也行,从网上一搜原来是因为server-id相同造成的,后来和另外一同事确认原来又配了一台从库,是直接复制的my.cnf配置文件造成的。改成不同的server-id后重启slave后同步恢复正常。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn