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.