MySQL sets up master-Slave synchronization and reports Slave can not handle replication events

Source: Internet
Author: User
Tags mysql database

After painstaking efforts, I want to review the MySQL master-slave architecture. Although I started the VM, I started two previously installed virtual machines, one CentOS6 and the other Ubuntu. Both of them have installed the MySQL database, no matter what you want to install, the configuration is okay. However, I dumped the database on the master database, copied it to the master database, and reported an error during synchronization:

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.'
Best of mind, I also asked DBA to repeat me and report this error. Although Google searches, this is a good guy.
This is because the master uses mysql5.6 and binlog_checksum sets crc32 by default. If slave uses version 5.5 or earlier, set the binglog_checksum of the master to none.
Remember that I installed mysql 5.6 on CentOS6 and 5.5 on Ubuntu.

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)
Solution:
Disable master checksum:


Set global binlog_checksum = 'none ';
 
Show variables like '% checksum % ';
Add the following settings to the my. cnf configuration file. The configuration will take effect immediately after the next restart.


Binlog_checksum = NONE
Re-query the master status:


Show master status \ G;
Done.
My name is DAB and I want to remember this problem, maybe next time.

Related Article

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.