关闭

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

278人阅读 评论(0) 收藏 举报
分类:

服务器重启导致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就行

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:144045次
    • 积分:2767
    • 等级:
    • 排名:第13577名
    • 原创:100篇
    • 转载:232篇
    • 译文:1篇
    • 评论:4条
    最新评论