免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1565 | 回复: 1
打印 上一主题 下一主题

求助:mysqlbinlog 回放失败 [复制链接]

论坛徽章:
2
数据库技术版块每日发帖之星
日期:2016-08-11 06:20:00数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-08-15 13:47 |只看该作者 |倒序浏览
使用mysqlbinlog提取日志的时候 报错
ERROR 1064 (42000) at line 7: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
BINLOG '
2iOxVw/tDAAAdAAAAHgAAAAAAAQANS42LjIzLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA' at line 1


我输入的命令为/export/servers/app/mysql-5.6.23/bin/mysqlbinlog /export/servers/data/my3309/log/log-bin.000007 --start-position=914 | mysql -ucyc -pcyc  --port=3309 --protocol=tcp

cat的出来的内容是
mysqlbinlog /export/servers/data/my3309/log/log-bin.000007 --start-position=914 2>/export/servers/data/my3309/erra.log
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#160815 10:07:22 server id 3309  end_log_pos 120 CRC32 0xbb918846         Start: binlog v 4, server v 5.6.23-log created 160815 10:07:22 at startup
ROLLBACK/*!*/;
BINLOG '
2iOxVw/tDAAAdAAAAHgAAAAAAAQANS42LjIzLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAADaI7FXEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAUaI
kbs=
'/*!*/;
# at 914
#160815 10:34:48 server id 3309  end_log_pos 997 CRC32 0x39029795         Query        thread_id=1        exec_time=0        error_code=0
SET TIMESTAMP=1471228488/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1075838976/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=83,@@session.collation_connection=83,@@session.collation_server=83/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 997
#160815 10:34:48 server id 3309  end_log_pos 1106 CRC32 0xdf45c4fe         Query        thread_id=1        exec_time=0        error_code=0
use `tempdb`/*!*/;
SET TIMESTAMP=1471228488/*!*/;
insert into tb1 values(4,4,4.4)
/*!*/;
# at 1106
#160815 10:34:48 server id 3309  end_log_pos 1137 CRC32 0x68e382ae         Xid = 39
COMMIT/*!*/;
# at 1137
#160815 11:29:59 server id 3309  end_log_pos 1160 CRC32 0xf7c113bd         Stop
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;


求问这个问题是什么引起的啊?

论坛徽章:
0
2 [报告]
发表于 2016-10-19 11:35 |只看该作者
你是在一台机器上重放另外一台机器的binlog吗?是不是版本不一致导致的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP