Solve the Last_IO_Errno: 1236 error of Mysql master-slave synchronization.

Source: Internet
Author: User

Slave server error code:

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.'

I have roughly analyzed the cause. I personally think it is likely that the reason is due to the different mysql versions and the incomplete backup. This problem does not exist for mysql with the same configuration version. (There is no specific reason for the test due to time issues)

The master server is upgraded to the latest mysql (5.6.29) version due to the downtime caused by the last php, while the slave server uses the db of 5.5.49 version when I just compiled it, therefore, it may be caused by this problem. I did not go to the official document, but I just guessed it.
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 re-compiled a mysql of the same version. The specific reason is different from the version. I did not study it carefully.
Slave temporary skip error method:
MySQL


Mysql> slave stop; # stop slave
Mysql> set global SQL _SLAVE_SKIP_COUNTER = 1;
Mysql> slave start; # start slave

Slave permanent skip error method:


Vi/etc/my. cnf
[Mysqld]
Slave-skip-errors = errors 1146, # skip errors of the specified error no type
# Slave-skip-errors = all # skip all errors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.