网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

MySQL中出现复制1594错误怎么办-创新互联

小编给大家分享一下MySQL中出现复制1594错误怎么办,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

成都创新互联服务项目包括离石网站建设、离石网站制作、离石网页制作以及离石网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,离石网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到离石省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

现象:
mysql> show slave status\G;
*************************** 1. row ***************************
-------------------------------------------------
              Master_Log_File: mysql-bin.000191
          Read_Master_Log_Pos: 334164088
               Relay_Log_File: mysql-srelay.000533
                Relay_Log_Pos: 902042386
        Relay_Master_Log_File: mysql-bin.000190
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1594
                   Last_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 will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
error_log如下:
160519 18:42:21 [ERROR] Error reading relay log event: Could not open log file
160519 18:42:21 [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 check the master's binary log or slave's relay log, you will be abl
e to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594
160519 18:42:21 [ERROR] Slave (additional info): File '/data/mysql3307/logs/mysql-srelay.030613' not found (Errcode: 2) Error_code: 29
160519 18:42:21 [Warning] Slave: File '/data/mysql3307/logs/mysql-srelay.030613' not found (Errcode: 2) Error_code: 29
160519 18:42:21 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.009095' position 1069989357

解析:

从日志我们看出可能是master或者slave的binlog损坏或者网络问题
但是网络测过是正常的
然后stop slave,发现主库上的binlog继续增加,且没产生error_log
由此怀疑从库中继binlog损害

解决:
既然找出了原因,解决就相对容易了
1.从库执行reset slave,清除掉binlog日志
2.从出错前的位置开始启动复制
本例的复制位置为:
'mysql-bin.009095' position 1069989357

以上是“MySQL中出现复制1594错误怎么办”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联-成都网站建设公司行业资讯频道!


网页名称:MySQL中出现复制1594错误怎么办-创新互联
文章路径:http://bjjierui.cn/article/ceiejc.html

其他资讯