服务器重启导致mysql同步出错

151119 11:05:04 mysqld_safe Starting mysqld daemon with databases from /data/mysql

151119 11:05:04 InnoDB: The InnoDB memory heap is disabled

151119 11:05:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins

151119 11:05:04 InnoDB: Compressed tables use zlib 1.2.3

151119 11:05:04 InnoDB: Initializing buffer pool, size = 128.0M

151119 11:05:04 InnoDB: Completed initialization of buffer pool

151119 11:05:05 InnoDB: highest supported file format is Barracuda.

InnoDB: Log scan progressed past the checkpoint lsn 68545964270

151119 11:05:05  InnoDB: Database was not shut down normally!

InnoDB: Starting crash recovery.

InnoDB: Reading tablespace information from the .ibd files...

InnoDB: Restoring possible half-written data pages from the doublewrite

InnoDB: buffer...

InnoDB: Doing recovery: scanned up to log sequence number 68551206912

InnoDB: Doing recovery: scanned up to log sequence number 68552486443

InnoDB: 1 transaction(s) which must be rolled back or cleaned up

InnoDB: in total 1770 row operations to undo

InnoDB: Trx id counter is 7270B00

151119 11:05:10  InnoDB: Starting an apply batch of log records to the database...

InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

InnoDB: Apply batch completed

InnoDB: Last MySQL binlog file position 0 134493648, file name /data/mysql/mysql-bin.000020

InnoDB: Starting in background the rollback of uncommitted transactions

151119 11:05:17  InnoDB: Rolling back trx with id 727097A, 1770 rows to undo

InnoDB: Progress in percents: 1151119 11:05:17  InnoDB: Waiting for the background threads to start

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100151119 11:05:18 InnoDB: 1.1.8 started; log sequence number 68552486443

151119 11:05:18 [Note] Recovering after a crash using /data/mysql/mysql-bin

InnoDB: Rolling back of trx id 727097A completed

151119 11:05:18  InnoDB: Rollback of non-prepared transactions completed

151119 11:05:20 [Note] Starting crash recovery...

151119 11:05:20 [Note] Crash recovery finished.

151119 11:05:20 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306

151119 11:05:20 [Note]   - '0.0.0.0' resolves to '0.0.0.0';

151119 11:05:20 [Note] Server socket created on IP: '0.0.0.0'.

151119 11:05:21 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=ubuntu-relay-bin' to avoid this problem.

151119 11:05:21 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000294' at position 1899391, relay log './ubuntu-relay-bin.000181' position: 1899537

151119 11:05:21 [Note] Slave I/O thread: connected to master 'sync_user@221.4.223.112:3306',replication started in log 'mysql-bin.000295' at position 3135683

151119 11:05:21 [Note] Event Scheduler: Loaded 0 events

151119 11:05:21 [Note] /usr/local/mysql/bin/mysqld: ready for connections.

Version: '5.5.28-log'  socket: '/tmp/mysqld.sock'  port: 3306  Source distribution

151119 11:05:22 [ERROR] Slave SQL: Error 'Duplicate entry '94518438098f096d051e7f59f0b99927' for key 'PRIMARY'' on query. Default database: 'gapi_gmytube'. Query: 'insert into `gapi_program_list` (`uuid`, `sort_index`, `name`, `url`, `thumbnail`, `description`, `issue_year`, `region`, `language`, `episode`, `type`, `id`, `record_create_time`, `display`, `cid`, `mid`, `category_id`) values ('94518438098f096d051e7f59f0b99927', '6242', 'EP15 T7', 'https://r1---sn-xjpm-q0nl.googlevideo.com/videoplayback?requiressl=yes&id=1681534fa61c0878&itag=18&source=picasa&ip=109.202.103.10&ipbits=0&expire=1439622882&sparams=expire,id,ip,ipbits,itag,mm,mn,ms,mv,pl,requiressl,source&signature=27FA6F3CDD05EC38F66F97F7C11596DE0F899CFF.14A772DC750CB9915954CF0A02B7B325771D39A2&key=cms1&cms_redirect=yes&mm=31&mn=sn-xjpm-q0nl&ms=au&mt=1437039975&mv=u&pl=21', 'http://178.162.199.30/photo/channel_logo/default_tv_icon.jpg', NULL, '2015', 'br', 'pt', '1', '3', '446cf471debe52749a98b1de73a5c961', '2015-11-18 08:18:08', '1', '180', '23', '16da0163a1ba9384e90aede

建议直接在my.cnf里添加slave_skip_errors = 1062

再重启mysql就行

mysql同步出错后重启_服务器重启导致mysql同步出错相关推荐

  1. mysql zimbra_记一次zimbra服务器故障导致mysql起不来问题

    记一次zimbra服务器故障导致mysql起不来问题 记一次zimbra服务器故障导致mysql起不来问题 服务器有一天突然访问不了,局域网连接不上,去机房查看,硬盘灯亮着,屏黑的,按电源键没法关机, ...

  2. mysql删库后恢复_记一次MySQL删库的数据恢复

    昨天因为不可描述的原因,数据库直接被 drop database删除.在第一时间停止数据库服务和Web服务,备份MySQL数据目录下的所有文件之后,开始走上数据恢复之路. 第一次干这种事,各种不得法. ...

  3. mysql数据库binlog日志截断报错,导致mysql主从同步失败故障排查

    mysql数据库binlog日志截断报错,导致mysql主从同步失败故障排查 Got fatal error 1236 from master when reading data from binar ...

  4. Linux服务器重启后crs,Linux服务器重启后crs_stat -t 命令无法正常使用以及解决思路...

    Linux服务器重启后crs_stat -t 命令无法正常使用以及解决思路 发布时间:2020-05-30 16:10:45 来源:51CTO 阅读:3571 作者:xiaocao13140 前提:在 ...

  5. mysql断电同步不起作用_记一次mysql主从同步因断电产生的不能同步问题 1236 and 1032...

    背景: 项目新上线一个月,qa需要测试断电服务拉起,服务拉起成功后,发现mysql主从异常 以下是发现的问题以及解决方案 问题1: Slave_IO_Running:  No 一方面原因是因为网络通信 ...

  6. mysql到pg怎么高效_干货 | Debezium实现Mysql到Elasticsearch高效实时同步(示例代码)

    题记 来自Elasticsearch中文社区的问题-- MySQL中表无唯一递增字段,也无唯一递增时间字段,该怎么使用logstash实现MySQL实时增量导数据到es中? logstash和kafk ...

  7. 服务器系统重启命令,服务器重启命令

    服务器重启命令 内容精选 换一换 openEuler,EulerOS,CentOS 8.0及以上操作系统默认开启SElinux强制模式,会导致工具安装失败.若想关闭SElinux强制模式,执行以下操作 ...

  8. 崩溃重启_semi-sync插件崩溃导致MySQL重启的故障分析-爱可生

    起因: 测试公司的保障MySQL高可用组件时发现一个异常. 停止从库,高可用组件将从库自动启动后,主库发生重启.而正常情况下主库不应发生重启. 环境: OS: CentOS release 6.7 ( ...

  9. 实现MySQL高可用群集配置_配置高可用性的MySQL服务器负载均衡群集

    mysql -u root -p USE mysqlclustertest; SELECT * FROM testtable; quit; SELECT查询出的结果应该依然是: mysql> S ...

最新文章

  1. c盘扩展卷是灰色的_银行电脑win7-C盘满了怎么办
  2. 7个让你惊叹的HTML技巧
  3. 工业互联网 — TSN — 技术架构
  4. linux 用户身份与进程权限
  5. C语言实现小时候经常做的智力测试题
  6. micropython文件上传软件_ESP32玩转MicroPython(二) 连接WIFI网络 webperl文件传输
  7. 13.2.5 模型层——单表操作
  8. GFS分布式文件系统简介及部署——让存储变得更高级
  9. centos7环境下ELK部署之elasticsearch
  10. [蓝桥杯2018初赛]方格计数-巧妙枚举,找规,数论
  11. 软RAID-mdadm折腾小记
  12. 阿里年薪40万老人简历:83岁精通网购,62岁会H5、PS
  13. 搭建 WPF 上的 UI 自动化测试框架
  14. 2. mac mysql error
  15. hdoj-1046-Gridland(规律题)
  16. HP520 笔记本 驱动安装的一些问题
  17. python3的spyder安装,python中spyder怎么安装
  18. Nginx跨域配置详解
  19. 怎么在电脑桌面添加待办便签小助手
  20. 触摸屏 java_价值10W大洋的触摸屏技术揭秘。。。

热门文章

  1. 日照职业学校单招计算机模拟题,2016年山东日照职业技术学院单招模拟题(含解析)...
  2. 【绝对干货】java面试笔试题及答案
  3. 如何快速判断一个文件是否为病毒,如何检测自己的电脑是不是中毒了或者存在病毒软件?
  4. LeetCode小白菜笔记[3]:Palindrome Number
  5. NSTimeInterval的使用
  6. 银时之魂服务器端文件,银时之魂电脑版 银时之魂PC版安装教程
  7. 手把手教你测——上网快鸟
  8. North America in my eyes
  9. 基于Springboot+Vue+Element实现汽车租赁系统
  10. 重庆大学计算机系保研,硬核!重庆7个学霸全部保送清华北大,还来自同一所学校!...