我在两台服务器上配置了双主同步,但是启动slave后,其中一台服务器报错;两服务器是同一网段同一机房;查看错误日志:Slave I/O thread: connected to master '[email protected]: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 '[email protected]:3306' - retry-time: 60  retries: 1, Error_code: 0得知是链接问题,于是通过同步账号repslave登录对应的主服务器链接,可行;但是登录后执行 SELECT UNIX_TIMESTAMP(),报错提示
ERROR 2013 (HY000): Lost connection to MySQL server during query