免费注册 查看新帖 |

Chinaunix

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

【求助】binlog导出为sql文件,为啥sql语句全是注释状态? [复制链接]

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:55:28
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-06-30 20:59 |只看该作者 |倒序浏览
本帖最后由 xinglu1983 于 2015-06-30 21:06 编辑

从阿里云云数据库rds上下载了binlog,使用命令:
  1. mysqlbinlog -v --base64-output=decode-rows -d dbname mysql-bin.000800 > test.sql
复制代码
打开后,发现test.sql里凡是insert update语句全是注释状态?这样执行source肯定是不成功的吧,是我使用方式不对吗?


跪求答复~
  1. /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
  2. /*!40019 SET @@session.max_insert_delayed_threads=0*/;
  3. /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
  4. DELIMITER /*!*/;
  5. # at 4
  6. #150623 21:10:10 server id 1154825058  end_log_pos 120 CRC32 0xc2bbe735         Start: binlog v 4, server v 5.6.16-log created 150623 21:10:10
  7. # at 120
  8. #150623 21:10:10 server id 1154825058  end_log_pos 231 CRC32 0x7ca67fb2         Previous-GTIDs
  9. # 648e928c-c587-11e4-903f-ac162d89fd88:1-88450260,
  10. # 72f39443-c587-11e4-903f-ac162d8aa4a4:1-6811
  11. # at 231
  12. #150623 21:10:14 server id 1065724891  end_log_pos 279 CRC32 0x515d2478         GTID [commit=yes]
  13. SET @@SESSION.GTID_NEXT= '648e928c-c587-11e4-903f-ac162d89fd88:88450261'/*!*/;
  14. # at 279
  15. #150623 21:10:14 server id 1065724891  end_log_pos 342 CRC32 0xe3592098         Query        thread_id=8124091        exec_time=0        error_code=0
  16. SET TIMESTAMP=1435061414/*!*/;
  17. SET @@session.pseudo_thread_id=8124091/*!*/;
  18. SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
  19. SET @@session.sql_mode=524288/*!*/;
  20. SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
  21. /*!\C utf8 *//*!*/;
  22. SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/*!*/;
  23. SET @@session.lc_time_names=0/*!*/;
  24. SET @@session.collation_database=DEFAULT/*!*/;
  25. BEGIN
  26. /*!*/;
  27. # at 342
  28. #150623 21:10:14 server id 1065724891  end_log_pos 404 CRC32 0x8a7c8cf6         Table_map: `mysql`.`ha_health_check` mapped to number 755912
  29. # at 404
  30. #150623 21:10:14 server id 1065724891  end_log_pos 460 CRC32 0xccd8cdcb         Update_rows: table id 755912 flags: STMT_END_F
  31. ### UPDATE `mysql`.`ha_health_check`
  32. ### WHERE
  33. ###   @1=1435061404168
  34. ###   @2='m'
  35. ### SET
  36. ###   @1=1435061414704
  37. ###   @2='m'
  38. # at 460
  39. #150623 21:10:14 server id 1065724891  end_log_pos 491 CRC32 0x4f517162         Xid = 102721104
  40. COMMIT/*!*/;
  41. # at 491
  42. #150623 21:10:25 server id 1065724891  end_log_pos 539 CRC32 0xce1bc682         GTID [commit=yes]
  43. SET @@SESSION.GTID_NEXT= '648e928c-c587-11e4-903f-ac162d89fd88:88450262'/*!*/;
  44. # at 539
  45. #150623 21:10:25 server id 1065724891  end_log_pos 602 CRC32 0x8004c9b6         Query        thread_id=8124116        exec_time=0        error_code=0
  46. SET TIMESTAMP=1435061425/*!*/;
  47. BEGIN
  48. /*!*/;
  49. # at 602
  50. #150623 21:10:25 server id 1065724891  end_log_pos 664 CRC32 0x535bfa0a         Table_map: `mysql`.`ha_health_check` mapped to number 755912
  51. # at 664
  52. #150623 21:10:25 server id 1065724891  end_log_pos 720 CRC32 0x47d0558a         Update_rows: table id 755912 flags: STMT_END_F
  53. ### UPDATE `mysql`.`ha_health_check`
  54. ### WHERE
  55. ###   @1=1435061414704
  56. ###   @2='m'
  57. ### SET
  58. ###   @1=1435061425308
  59. ###   @2='m'
  60. # at 720
  61. #150623 21:10:25 server id 1065724891  end_log_pos 751 CRC32 0xb26e12cd         Xid = 102721160
  62. COMMIT/*!*/;
复制代码
test.zip (11.82 KB, 下载次数: 3)

test.zip

11.82 KB, 下载次数: 3

求职 : Linux运维
论坛徽章:
203
拜羊年徽章
日期:2015-03-03 16:15:432015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:092015小元宵徽章
日期:2015-03-06 15:58:182015年亚洲杯之约旦
日期:2015-04-05 20:08:292015年亚洲杯之澳大利亚
日期:2015-04-09 09:25:552015年亚洲杯之约旦
日期:2015-04-10 17:34:102015年亚洲杯之巴勒斯坦
日期:2015-04-10 17:35:342015年亚洲杯之日本
日期:2015-04-16 16:28:552015年亚洲杯纪念徽章
日期:2015-04-27 23:29:17操作系统版块每日发帖之星
日期:2015-06-06 22:20:00操作系统版块每日发帖之星
日期:2015-06-09 22:20:00
2 [报告]
发表于 2015-06-30 23:44 |只看该作者
看一下阿里云的文档吧,阿里云真实非常奇怪!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP