ERROR 2013 (HY000): Lost connection to MySQL server during query
我在两台服务器上配置了双主同步,但是启动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
查看错误日志:
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
...全文
相关推荐
MySQL ERROR 2013 (HY000)错误解决方法
当通过 TCP/IP 连接 MySQL 远程主机时,出现 ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial
MySQL出现SQL Error (2013)连接错误的解决方法
在使用MySQL数据库时,有时会遇到SQL Error (2013)这样的连接错误,提示"Lost connection to MySQL server at 'waiting for initial
MySQL中DATE_FORMATE函数使用时的注意点
当 `DATE_FORMAT()` 和 `TIMEDIFF()` 结果的字符集不匹配时,会导致类似 `ERROR 1267 (HY000): Illegal mix of collations` 的错误
MySQL中日期比较时遇到的编码问题解决办法
这是因为这两个函数处理字符集的方式不同,可能导致非法混合的字符集错误,即“ERROR 1267 (HY000): Illegal mix of collations”。
MySQL连接错误解决[代码]
其中ERROR 2005 (HY000): Unknown MySQL server host这一错误提示具有明确的语义指向性,它并非表示目标主机不存在或网络不可达,而是客户端在解析连接参数时无法识别所指定的服务器主机标识


