mysql高版本5.6到5.5或低版本复制中出现的错误

在高版本启动时,忘记配置binlog_checksum参数,会导致生成的binlog中有校验算法的日志,当从库版本低于主库,就会报错

mysql高版本5.6到5.5或低版本复制中出现的错误_第1张图片


看下面忘记添加参数时,解析的binlog

mysql高版本5.6到5.5或低版本复制中出现的错误_第2张图片

修改my.cnf文件或动态修改set global  binlog_checksum=none 后,reset master,生成新的binlog

[root@st1 log]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 288
Server version: 5.6.38-log MySQL Community Server (GPL)


Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> reset master;
Query OK, 0 rows affected (0.00 sec)


mysql> show master status;
+-------------------+----------+--------------+------------------+-------------------+
| File              | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+-------------------+----------+--------------+------------------+-------------------+
| master-bin.000001 |      120 |              |                  |                   |
+-------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)


mysql> exit
Bye



再次看解析的binlog,已经没有crc32校验

mysql高版本5.6到5.5或低版本复制中出现的错误_第3张图片

你可能感兴趣的:(mysql)