MySQL 搭建主从同步,从报 Slave can not handle replication events with the checks...
source link: https://www.liurongxing.com/mysql-slave-can-not-handle-replication-events-with-the-checksum-that-master.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
MySQL 搭建主从同步,从报 Slave can not handle replication events with the checksum that master 错误问题
心血来朝,想复习一下MySQL主从搭建,虽开打VM,分别开启了我以前安装的两台虚拟机,一台CentOS6 一台Ubuntu,这两台都安装好了MySQL数据库,安装啥的不说了,配置也没问题。但是但我把主上的数据库dump出来,复制来从上,然后做同步的时候报错了:
Slave_IO_Running: No
Slave_SQL_Running: Yes
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log:
'Slave can not handle replication events with the checksum that master is configured to log; the first event '
binlog.000005
' at 805, the last event read from '
/data/dbdata/mysqllog/binlog/binlog
.000005
' at 805, the last byte read from '
/data/dbdata/mysqllog/binlog/binlog
.000005
' at 120.'
百思不得奇解,还叫过DBA把我从做了一遍,还是报这个错,虽放 Google 一搜索,好家伙。
这是由于 master 用的 mysql5.6 , binlog_checksum 默认设置的是 crc32。 如果slave用的 5.5 或者更早的版本,请将master的 binglog_checksum设置为 none。
才记起来我 CentOS6 安装的是 mysql 5.6 版本, Ubuntu系统上安装的是 5.5版本
root@mysql 19:22>
select
@@version;
+------------+
| @@version |
+------------+
| 5.6.16-log |
+------------+
1 row
in
set
(0.00 sec)
root@(none) 19:36>
select
@@version;
+------------+
| @@version |
+------------+
| 5.5.27-log |
+------------+
1 row
in
set
(0.00 sec)
解决步骤:
- 关闭 master checksum:
set
global binlog_checksum=
'NONE'
;
show variables like
'%checksum%'
;
- 添加 my.cnf 配置文件中添加如下设置,下次重启就可以不用做步骤1,直接生效了。
binlog_checksum=NONE
- 重新查询master状态:
show master status\G;
搞定。
然后我叫DAB也要把这问题好好记一下,没准下次就会遇到了。
binlog checksum功能介绍
-
Pingback: MySQL-主从复制配置 – 唐亚军的IT笔记
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK