Mysql master-slave synchronization Last_IO_Errno:1236 error solution

Mysql master-slave synchronization Last_IO_Errno:1236 error solution

What is the reason for the Last_IO_Errno:1236 error of Mysql master-slave synchronization? How can we solve this problem? Let's take a look at the records and solutions of this problem with the editor.

<script>ec(2);</script>

Error code from server:

Last_IO_Errno: 1236
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 'mysql-bin.000005' at 16750821, the last event read from '/usr/local/mysql/Binlog/mysql-bin.000005' at 16750821, the last byte read from '/usr/local/mysql/Binlog/mysql-bin.000005' at 120.'

After a rough analysis of the reasons, I personally think that the most likely factors are ① different MySQL versions; ② incomplete backup. This problem did not exist in the previous MySQL configuration with the same version. (Time issue, no specific test reason)

The main server was upgraded to the latest version of MySQL (5.6.29) due to the last PHP-induced downtime, and the slave server used the 5.5.49 version of the db when I just compiled it. Therefore, I infer that it may be caused by this problem. I have not read the official documentation and it is just my personal guess.

Another problem caused by different versions is:

[root@Backup tmp]# /usr/local/mysql/bin/mysql -uroot -p <./all.sql 
Enter password: 
ERROR 1064 (42000) at line 279: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STATS_PERSISTENT=0' at line 11

I was lazy and just recompiled a MySQL version of the same version. I didn't study the specific reasons carefully because the versions were different.

Slave temporarily skips error method:

MySQL

mysql>slave stop; #stop slave
mysql>SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
mysql>slave start; #start slave

How to permanently skip errors with slave:

vi /etc/my.cnf
[mysqld]
slave-skip-errors=1062,1053,1146 #Skip errors of the specified error no type #slave-skip-errors=all #Skip all errors

Summarize

The above is all the content of this article about the solution to the error Last_IO_Errno:1236 in Mysql master-slave synchronization. I hope it will be helpful to everyone. If you have any better solution, please leave a message and we can discuss it together.

Interested friends can refer to: Analysis of different error problems in MySQL table sorting rules, Introduction to enterprise production MySQL optimization, Analysis of MYSQL subquery and nested query optimization examples, etc. If you have any questions, please leave a message and the editor will reply to you in time. Thank you friends for supporting this site!

You may also be interested in:
  • MySQL master-slave synchronization, implementation principle of transaction rollback
  • Detailed explanation of the actual process of master-slave synchronization of MySQL database
  • Detailed explanation of server-id example in MySQL master-slave synchronization
  • Mysql master-slave synchronization configuration scheme under Centos7 system
  • Causes and solutions for MySQL master-slave synchronization delay
  • MySQL master-slave synchronization mechanism and synchronization delay problem tracking process
  • Master-slave synchronization configuration and read-write separation of MySQL database
  • The implementation principle of Mysql master-slave synchronization
  • Detailed explanation of Mysql master-slave synchronization configuration practice
  • Detailed explanation of mysql master-slave synchronization under windows
  • Detailed explanation of how to set up master-slave synchronization in MySQL database
  • Master-slave synchronization configuration of Mysql database

<<:  js canvas realizes random particle effects

>>:  How to enhance Linux and Unix server security

Recommend

Vue mobile terminal realizes finger sliding effect

This article example shares the specific code for...

How to permanently change the host name in Linux

If you want to change your host name, you can fol...

CentOS uses expect to remotely execute scripts and commands in batches

Sometimes we may need to operate servers in batch...

MySQL Daemon failed to start error solution

MySQL Daemon failed to start error solution A few...

How to open port 8080 on Alibaba Cloud ECS server

For security reasons, Alibaba Cloud Server ECS co...

Are the value ranges of int(3) and int(10) the same in mysql

Table of contents Question: answer: Reality: Know...

How to use Portainer to build a visual interface for Docker

Portainer Introduction Portainer is a graphical m...

How to query duplicate data in mysql table

INSERT INTO hk_test(username, passwd) VALUES (...

Summary of Seven Basic XHTML Coding Rules

1. All tags must have a corresponding end tag Prev...

Native js to implement form validation function

Table of contents When developing, analyzing the ...

Detailed steps for using AES.js in Vue

Use of AES encryption Data transmission encryptio...

How to install nginx in centos7

Install the required environment 1. gcc installat...

Detailed explanation of mysql record time-consuming sql example

mysql records time-consuming sql MySQL can record...

How to use gdb to debug core files in Linux

1.core file When a Segmentation fault (core dumpe...