ERROR 2013 (HY000): Lost connection to MySQL server during query

neilyqb 2016-04-20 04:48:11
我在两台服务器上配置了双主同步,但是启动slave后,其中一台服务器报错;两服务器是同一网段同一机房;

查看错误日志:

Slave I/O thread: connected to master 'repslave@192.168.10.84:3306',replication started in log 'mysql-bin.000027' at position 559
2016-04-20 16:40:35 29133 [Warning] Slave SQL: If a crash happens this configuration does not guarantee that the relay log info will be consistent, Error_code: 0
2016-04-20 16:40:35 29133 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000027' at position 559, relay log '.192.168.1.84-bin.000001' position: 4
2016-04-20 16:40:35 29133 [Warning] "SELECT UNIX_TIMESTAMP()" failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS. Error: Aborted connection 12 to db: 'unconnected' user: 'repslave' host: '192.168.1.82' (init_connect command failed) (1184)
2016-04-20 16:40:35 29133 [Warning] Slave I/O: Get master SERVER_ID failed with error: Lost connection to MySQL server during query, Error_code: 2013
2016-04-20 16:40:35 29133 [Warning] Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again, log 'mysql-bin.000027' at position 559, Error_code: 1597
2016-04-20 16:40:35 29133 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
2016-04-20 16:40:35 29133 [ERROR] Slave I/O: error reconnecting to master 'repslave@192.168.1.84:3306' - retry-time: 60 retries: 1, Error_code: 0

得知是链接问题,于是通过同步账号repslave登录对应的主服务器链接,可行;但是登录后执行 SELECT UNIX_TIMESTAMP(),报错提示
ERROR 2013 (HY000): Lost connection to MySQL server during query
...全文
915 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
dfwdzy 2016-04-22
  • 打赏
  • 举报
回复
在 my.cnf 里面的 [mysqld] 段增加一个启动参数 skip-name-resolve
zhu19774279 2016-04-21
  • 打赏
  • 举报
回复
两台服务器的时区以及时间一样吗。用ntp同步时间再试试看。
neilyqb 2016-04-21
  • 打赏
  • 举报
回复
时区是一样的,只是时间没有同步,隔了2分钟; 而后,我设置了两台服务器的时间一致,但是问题还在
neilyqb 2016-04-20
  • 打赏
  • 举报
回复
通过slave账号可以互相登录,可以排除防火墙的问题,但是提示查询时间错报错,却又不明确是为何
Delphi 7.1 Update Release Notes=======================================================This file contains important supplemental and late-breakinginformation that may not appear in the main productdocumentation, and supersedes information contained in otherdocuments, including previously installed release notes.Borland recommends that you read this file in its entirety.NOTE: If you are updating a localized version of Delphi 7, visit the Borland Registered User web site to obtain a localized readme file that may contain important late- breaking information not included in this readme file.IMPORTANT: Delphi must be closed before installing this update. =====================================================CONTENTS * INSTALLING THIS UPDATE * UPDATING LOCALIZED VERSIONS OF DELPHI 7 * KNOWN ISSUES * ISSUES ADDRESSED BY THIS UPDATE - IDE - CORE DATABASE - DATASNAP - DBGO (ADO COMPONENTS) - dbExpress - dbExpress COMPONENTS AND DB VCL - dbExpress CORE DRIVER AND METADATA - dbExpress VENDOR ISSUES - dbExpress CERTIFICATION - WEB SNAP - ACTIVEX - COMPILER - RTL - VCL - THIRD PARTY - BOLD FOR DELPHI * VERIFYING THAT THE UPDATE WAS SUCCESSFUL * FILES INSTALLED BY THIS UPDATE =======================================================INSTALLING THIS UPDATE* This update can not be applied to Delphi 7 Architect Trial version. * This update can not be removed after it is installed.* You will need the original Delphi 7 installation CD available to install this update.* To install this update from the CD, insert the CD, and launch the d7_ent_upd1.exe file appropriate for your locale.* To install this update from the Web, double-click the self-executing installation file and follow the prompts. * The Delphi 7 documentation PDF files are available on the update CD.========================================================UPDATING LOCALIZED VERSIONS OF DELPHI 7* This update can be applied only to the English version of Delphi 7. There are separate updates for the German, French and Japanese ver

56,679

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧