7

Our server had disk space problems. As a result, replication's IO Threads fails to start.

Here are the errors in mysql error log:

[Note] Slave I/O thread: connected to master 'user@host:3307',replication started in log 'mysql-bin.000030' at position 196820914

[ERROR] Slave I/O: Replication event checksum verification failed while reading from network. Error_code: 1743

[ERROR] Slave I/O: Relay log write failure: could not queue event from master, Error_code: 1595

How do I fix the problem?

RolandoMySQLDBA
  • 182,700
  • 33
  • 317
  • 520
mvladk
  • 173
  • 1
  • 1
  • 7

1 Answers1

9

Try resetting the relay logs as follows:

STOP SLAVE;
CHANGE MASTER TO master_log_file='mysql-bin.000030',master_log_pos=196820914;
START SLAVE;

This will erase all relay logs in the Slave, starting with a fresh one. It should start retrieving binlog events from the Master. If it fails again, then mysql-bin.000030 on the Master may be corrupt. In that event, you would have to set up replication from scratch by doing this:

  • Stop the DB Application
  • On the Master, RESET MASTER;
  • mysqldump the data from the Master
  • Load the mysqldump on the Slave
  • On the Slave, run STOP SLAVE;
  • On the Slave, run CHANGE MASTER TO master_log_file='mysql-bin.000001',master_log_pos=4;
  • On the Slave, run START SLAVE;

CAVEAT

Make sure the network connection is clear (with no dropped packets) between Master and Slave.

Give it a Try !!!

RolandoMySQLDBA
  • 182,700
  • 33
  • 317
  • 520
  • Thanks a lot! Worked perfectly! I had mysql-bin corrupted on the Master. – mvladk Apr 03 '14 at 00:27
  • CHANGE MASTER TO master_log_file='mysql-bin.000001',master_log_pos=4; is of course not generally correct - you need to adjust the log file name and log position for your needs. – David Jul 20 '17 at 10:51
  • @David you can use position 4 in all versions of MySQL back to at least 4.1 when doing non-GTID replication. See my November 2014 post where I discuss that (https://dba.stackexchange.com/questions/82998/question-on-having-a-mysql-5-1-replicate-from-a-mysql-5-6-db/83010#83010). Also, see how the MySQL 5.7 Documentation still uses it (https://dev.mysql.com/doc/refman/5.7/en/change-master-to.html). I have used it two days ago in a 5.7 setup without incident. Using positions from specific versions as works (https://dba.stackexchange.com/questions/12530/mysql-master-binlog-corruption/12531#12531) – RolandoMySQLDBA Jul 20 '17 at 11:11
  • STOP SLAVE: and START SLAVE: were enough to get it working again for me. Probably won't work in most cases but its worth a shot. – kagronick Sep 05 '18 at 13:51