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.主机宕机后,如果不是长时间宕机,且 ...
随机推荐
- NetCore入门篇:(十一)NetCore项目读取配置文件appsettings.json
一.简介 1.读取配置文件是开发过程中使用非常频繁的操作.属称”不能写死“ 二.NetCore读取配置文件 1.新建一个静态公共变量,属称单例. 2.在程序Startup启动时,将系统变量传递给单例. ...
- 基于C#语言MVC框架NPOI控件导出Excel表数据
控件bin文件下载地址:https://download.csdn.net/download/u012949335/10610726@{ ViewBag.Title = "dcxx" ...
- Django分页设置
1. """ 分页组件使用示例: obj = Pagination(request.GET.get('page',1),len(USER_LIST),request.pa ...
- 数据库的完整性约束(ForeignKey ,Unique)
文字转自于 海燕.博客 一.介绍 约束条件与数据类型的宽度一样,都是可选参数 作用:用于保证数据的完整性和一致性主要分为: PRIMARY KEY (PK) 标识该字段为该表的主键,可以唯一的标识记录 ...
- BZOJ 4517--[Sdoi2016]排列计数(乘法逆元)
4517: [Sdoi2016]排列计数 Time Limit: 60 Sec Memory Limit: 128 MBSubmit: 1727 Solved: 1067 Description ...
- Flask 中的 Response
1.Flask中的HTTPResponse @app.route("/") # app中的路由route装饰器 def index(): # 视图函数 return "I ...
- MySQL(安装,服务,创建用户及授权)
参考:http://www.cnblogs.com/wupeiqi/p/5713315.html 单机程序(自己DB) 单机程序(公用DB) MySQL:是用于管理文件的一 ...
- ACTIVEMQ监控项目admin队列详情中文乱码
一.使用ACTIVEMQ队列,传入ObjectMessage时,监控项目admin无法解析消息信息,需要将消息javabean打成jar放入lib文件夹中,重启ACTIVEMQ,注意javabean要 ...
- react native 学习之 native modules
翻译自https://facebook.github.io/react-native/docs/native-modules-ios.html Native Modules 很多情况下,app需要使用 ...
- powerDesiner设计数据库的一些用法
数据库的设计主要有以下几个步骤: 1:需求分析:根据业务需求分析出满足客户的需求,从而建立相应的数据库 2:概念设计:通过数据抽象,设计系统概念模型,一般为E-R模型:(entity-relation ...