最近在做数据库实例迁移的时候遇到了几个比较诡异的问题:
warning : Duplicate key for record at 104678355 against record at 61426294
warning : Duplicate key for record at 297493788 against record at 61697778
warning : Duplicate key for record at 209950328 against record at 61548867
warning : Duplicate key for record at 105894968 against record at 61866949
...
...
补充一下当时的环境信息:
1.MySQL版本为官方版的5.5.12,表引擎是MyISAM
2.迁移的步骤:stop slave->flush tables->正常shutdown实例->rsync表文件->在新机器上起实例。rsync前后表文件MD5值一样。
- MyISAM实例正常shutdown后rsync数据文件到另外一台机器上起实例后,访问表时提示表自动修复失败需要repair table。提示信息:Table './test/record_03' is marked as crashed and last (automatic?) repair failed
- 表损坏后,利用repair table命令将表修复时提示表里存在很多的duplicate key.
warning : Duplicate key for record at 104678355 against record at 61426294
warning : Duplicate key for record at 297493788 against record at 61697778
warning : Duplicate key for record at 209950328 against record at 61548867
warning : Duplicate key for record at 105894968 against record at 61866949
...
...
补充一下当时的环境信息:
1.MySQL版本为官方版的5.5.12,表引擎是MyISAM
2.迁移的步骤:stop slave->flush tables->正常shutdown实例->rsync表文件->在新机器上起实例。rsync前后表文件MD5值一样。