One: Problem description
In the MySQL version of the upgrade experiment, the 5.5.19 from the library to the 5.6.33 main library, slave slave, view the slave status, found the error:
Mysql> show slave status \g; 1.
Row *************************** slave_io_state:master_host:10.192.203.202 Master_user:repuser master_port:3306 connect_retry:60 Master_log_
file:mysql-bin.000005 read_master_log_pos:120 relay_log_file:master-relay-bin.000007 relay_log_pos:150 relay_master_log_file:mysql-bin.000005 Slave_io_running:no Sl
Ave_sql_running:yes Replicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table: Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 0 last_error:skip_counter:1 exec_master_log_pos:120 Relay_
log_space:350 Until_condition:none Until_log_file: until_log_pos:0 Master_ssl_allowed:no Master_ssl_ca_file:master_ssl_c A_Path:Master_SSL_Cert:Master_SSL_Cipher:Master_SSL_Key:Seconds_B Ehind_master:null Master_ssl_verify_server_cert:no last_io_errno:1236 Last_io_error:go T fatal error 1236 from master to reading data from binary log: ' Slave can not handle replication events with the checks Um that master are configured to log; The ' mysql-bin.000005 ' at the "at", the last event read from './mysql-bin.000005 ', the last byte read from '
./mysql-bin.000005 ' at 120. ' last_sql_errno:0 last_sql_error:replicate_ignore_server_ids:master_server_id:2 1 Row i
N Set (0.00 sec)
The main library error log also has a warning:
[Warning] Master is configured to logreplication events with checksum, but won't send such events to slaves thatcannot process th Em
Two: The cause of the error
This is because the Binlog_checksum default setting for mysql5.6 is CRC32. 5.5 or earlier versions do not have this variable binlog_checksum.
MySQL 5.6:
Mysql> Show variables like ' binlog_checksum ';
+-----------------+-------+
| variable_name | Value |
+-----------------+-------+
| Binlog_checksum | CRC32 |
+-----------------+-------+
Mysql version 5.5 or earlier:
Mysql> Show variables like ' binlog_checksum ';
Empty Set (0.00 sec)
III: Solutions
Modify the Master Library profile: Add Binlog_checksum=none, and then restart Master Library master.
#注意: I found that the set global binlog_checksum= none this way, although it looks like a successful modification, restarts the database and becomes the previous CRC32.
Then show master status in the main library;
You can specify this new location from the library.
Such as:
Main Library: mysql> show Master status; +------------------+----------+--------------+------------------+-------------------+
| File | Position | binlog_do_db | binlog_ignore_db |
Executed_gtid_set | +------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000009 | 120 | | |
|
+------------------+----------+--------------+------------------+-------------------+ 1 row in Set (0.00 sec) from library:
Mysql> STOP SLAVE; Query OK, 0 rows Affected (0.00 sec) mysql> Change Master tomaster_log_file= ' mysql-bin.000009 ', Master_log_pos=120,mas
Ter_host= ' 10.192.203.202 ', master_user= ' repuser ', master_password= ' Beijing ', master_port=3306;
Query OK, 0 rows affected (0.03 sec) mysql> start slave;
Query OK, 0 rows Affected (0.00 sec) mysql> Show slave status \g; 1.
row*************************** slave_io_state:waiting Formaster to send event master_host:10.192.203.202 Master_user:repuser master_port:3306 Co Nnect_retry:60 master_log_file:mysql-bin.000009 read_master_log_pos:120 Relay_log
_file:master-relay-bin.000002 relay_log_pos:266 relay_master_log_file:mysql-bin.000009
Slave_io_running:yes Slave_sql_running:yes replicate_do_db:replicate_ignore_db:
Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table: last_errno:0 last_error:skip_counter:0 Exec_master_log_pos:
relay_log_space:423 Until_condition:none Until_log_file:
until_log_pos:0 Master_ssl_allowed:no Master_ssl_ca_file:master_ssl_ca_path:
Master_ssl_cert: master_ssl_cipher:master_ssl_key:seconds_behind_master:0 Master_ssl_verify_server_cert:no last_io_errno:0 last_io_error:last_sql_errno:0 Last_sql_er Ror:replicate_ignore_server_ids:master_server_id:2 1 row in Set (0.00 sec) error:no query specified m
Ysql>
--This article references from: https://my.oschina.net/congqian/blog/138485