mariadb(mysql)从库relaylog损坏无法同步的处理方法
mariadb_1 | -- :: [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1 | -- :: [Note] Recovering after a crash using mysql-bin
mariadb_1 | -- :: [Note] Starting crash recovery...
mariadb_1 | -- :: [Note] Crash recovery finished.
mariadb_1 | -- :: [Note] Server socket created on IP: '0.0.0.0'.
mariadb_1 | -- :: [Warning] 'proxies_priv' entry '@% xxx@xxx' ignored in --skip-name-resolve mode.
mariadb_1 | -- :: [Note] Reading of all Master_info entries succeded
mariadb_1 | -- :: [Note] Added new Master_info '' to hash table
mariadb_1 | -- :: [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--log-basename=#' or '--relay-log=mysqld-relay-bin' to avoid this problem.
mariadb_1 | -- :: [Note] mysqld: ready for connections.
mariadb_1 | Version: '10.2.14-MariaDB-10.2.14+maria~jessie-log' socket: '/var/run/mysqld/mysqld.sock' port: mariadb.org binary distribution
mariadb_1 | 2018-09-15 17:04:28 140261962921728 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000239' at position 13999540, relay log './mysqld-relay-bin.000261' position: 13999839
mariadb_1 | 2018-09-15 17:04:28 140261962921728 [ERROR] Error in Log_event::read_log_event(): 'Event truncated', data_len: 489, event_type: 2
mariadb_1 | -- :: [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
mariadb_1 | -- :: [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 able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Internal MariaDB error code:
mariadb_1 | -- :: [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.000239' position
mariadb_1 | -- :: [Note] Slave SQL thread exiting, replication stopped in log 'mysql-bin.000239' at position
mariadb_1 | -- :: [Note] Slave I/O thread: connected to master 'xxx@xxx.xxx.xxx.xxx:3306',replication started in log 'mysql-bin.000239' at position
mariadb_1 | -- :: [Note] InnoDB: Buffer pool(s) load completed at ::
原因分析
mariadb_1 | -- :: [ERROR] Error in Log_event::read_log_event(): 'Event truncated', data_len: , event_type:
如果relay-log(binlog)文件有错误,通过mysqlbinlog <relay log路径> > /dev/null测试,也会打出上面一样的错误。
> STOP SLAVE;
> RESET SLAVE;
mariadb(mysql)从库relaylog损坏无法同步的处理方法的更多相关文章
- MySQL主主互备不同步的解决方法
MySQL主主互备不同步 首先在服务器上执行show slave satus;可以看到很多同步的参数: Master_Log_File: SLAVE中的I/O线程当前正在读取的主服务器二进制日志文件的 ...
- 创建MySQL从库
我们知道Oracle有DataGuard实时备份数据.能够做主备切换,而MySQL也有自己的一套备库方案.称之为主从复制. 搭建MySQL从库是为了实时同步主库数据,同一时候也能够分担主库的读压力.对 ...
- MYSQL主从库同步配置过程
MYSQL主从库同步配置过程 为了实现网站数据库的异地备份,采用了MySQL数据库主从同步配置,需要两台服务器分别作为主从库,当主库发生增删改等操作,会实时反映到从库,我的个人服务器配置如下: 主库为 ...
- Mariadb/Mysql命令行常用命令
一.初始化等 1.登陆数据库方法 mysql -u 用户名 -p 用户密码 2.修改root及用户密码 use mysql; update user set password=password( ...
- Mariadb/Mysql 主从复制(1)
一.原理 mysql的主从数据同步是一个异步复制过程,需要master开启bin-log日志功能,bin-log记录了master库中的增.删.修改.更新操作的sql语句,整个过程需要开启3个线程,分 ...
- MySQL数据的主从复制、半同步复制和主主复制详解
一.MySQL复制概述 ⑴.MySQL数据的复制的基本介绍 目前MySQL数据库已经占去数据库市场上很大的份额,其一是由于MySQL数据的开源性和高性能,当然还有重要的一条就是免费~不过不知道还能免费 ...
- MySQL数据的主从复制、半同步复制和主主复制详解-转
一.MySQL复制概述 ⑴.MySQL数据的复制的基本介绍 目前MySQL数据库已经占去数据库市场上很大的份额,其一是由于MySQL数据的开源性和高性能,当然还有重要的一条就是免费~不过不知道还能免费 ...
- Asp.Net Core 轻松学-使用MariaDB/MySql/PostgreSQL和支持多个上下文对象
前言 在上一篇文章中(Asp.Net Core 轻松学-10分钟使用EFCore连接MSSQL数据库)[https://www.cnblogs.com/viter/p/10243577.html],介 ...
- 【MySQL】MySQL主从库配置和主库宕机解决方案
1.转载:https://blog.csdn.net/zfl589778/article/details/51441719/ 2.效果:亲测有效,数据写入成功. 3.主机宕机后,如果不是长时间宕机,且 ...
随机推荐
- Interesting JavaScript
作者:ManfredHu 链接:http://www.manfredhu.com/2016/07/07/20-interestingJavascript 声明:版权所有,转载请保留本段信息,否则请不要 ...
- nginx 场景业务汇总 (初)
本文链接:http://www.cnblogs.com/zhenghongxin/p/8891385.html 在下面的测试中,建议每次修改nginx配置文件后,都用此命令检查一下语法是否正确: [r ...
- series dataframe 的 idxmax()
返回最大值的索引
- click 版本升级7.0踩过的坑
click 版本升级7.0踩过哪些坑? click 版本6.7升级至7.0以上,包名由 click 变更为 Click click 的 Options 和 Parameters 规则变更为如下: Fo ...
- 《Python绝技:运用Python成为顶级黑客》 用Python实现免杀
1.免杀的过程: 使用Metasploit生成C语言风格的一些shellcode作为载荷,这里使用Windows bindshell,功能为选定一个TCP端口与cmd.exe进程绑定在一起,方便攻击者 ...
- Nginx + uWSGI 部署Django 项目,并实现负载均衡
一.uWSGI服务器 uWSGI是一个Web服务器,它实现了WSGI协议.uwsgi.http等协议.Nginx中HttpUwsgiModule的作用是与uWSGI服务器进行交换. 要注意 WSGI ...
- 一种基于zookeeper的分布式队列的设计与实现
package com.ysl.zkclient.queue; import com.ysl.zkclient.ZKClient; import com.ysl.zkclient.exception. ...
- Storm-kafka源码分析之Config相关类
要创建一个KafkaSpout对象,必须要传入一个SpoutConfig对象,KafkaSpout的构造函数定义如下: public KafkaSpout(SpoutConfig spoutConf) ...
- Swift Podfile中的 use_frameworks!
use_frameworks! A.用cocoapods 导入swift 框架 到 swift项目和OC项目都必须要 use_frameworks!B.使用 dynamic frameworks,必须 ...
- 03——Solr学习之Solr的使用(不会用)
1.先放上次在linux搭建成功的solr管理UI界面 2.有个很蛋疼的问题我就要吐槽一下了 由于没接触过solr这玩意,在百度上一顿操作搜索怎么用,怎么导入数据,建索引库什么的,看了一大片别人的博客 ...