MySQL cannot sync from library, error relay log read failure

Source: Internet
Author: User
Tags mysql code


Questions: MySQL data from the library can not be synchronized, from the library show SLAVE status prompts the following error:

Last_sql_error:relay Log read failure:could not parse Relay log event entry. The possible reasons Are:the master ' s binary log is corrupted (you can check this by running ' mysqlbinlog ' on the binary Log), the slave ' s relay log is corrupted (you can check this by running ' Mysqlbinlog ' on the relay log), a network problem , or a bug in the master's or slave ' s MySQL code. If you want to check the master's binary log or slave ' s relay log, you'll be a able to know their names by issuing ' SHOW s Lave STATUS ' on this slave.


Try:

SQL thread cannot read relay-log, estimate relay-log corruption!

Try restarting Slave

Stop slave;

Start slave;

Viewing status is still the error!


Workaround:

(1) Check the MySQL error log and record the last two digits:

tail /opt/mysql_log/mysql_error.err2015-01-23 16:34:30 1962 [error] error  Reading relay log event: slave sql thread aborted because of  i/o error2015-01-23 16:34:30 1962 [error] slave sql: relay log  read failure: could not parse relay log event entry. the  possible reasons are: the master ' s binary log is corrupted  (you can check this by running  ' Mysqlbinlog '  on the binary  LOG),  the slave ' s relay log is corrupted  (you can check this  by running  ' Mysqlbinlog '  on the relay log), a network  Problem, or a bug in the master ' S or slave ' S MySQL code.  if you want to&Nbsp;check the master ' S binary log or slave ' s relay log, you  will be able to know their names by issuing  ' show  Slave status '  on this slave. error_code: 15942015-01-23 16:34:30 1962  [ERROR] Error running query, slave SQL thread aborted. Fix  the problem, and restart the slave sql thread with  "SLAVE  START ". we stopped at log  ' logbin.000054 '  position 1278235

(2) Stop copying from library

Stop slave;

(3) Try repositioning the main library

Change Master to master_log_file= ' logbin.000054 ', master_log_pos=1278235;

(4) Turn on copy from library

Start slave;


This article is from the "twists and turns ◇2015" blog, please be sure to keep this source http://huangfuff.blog.51cto.com/2632203/1607491

MySQL cannot sync from library, error relay log read failure

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.