您的位置:首页 > 数据库 > MySQL

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

2017-10-23 16:55 615 查看
在高版本启动时,忘记配置binlog_checksum参数,会导致生成的binlog中有校验算法的日志,当从库版本低于主库,就会报错



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



修改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校验

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: