热搜词
发表于 2017-6-11 21:38:00 | 显示全部楼层 |阅读模式
由于程序升级,利用Navicat工具同步两个MySQL数据库结构,源数据库为江湖家居V6.0至尊版,目标数据库为江湖家居V6.0标准版,运行时钩选“遇到错误继续”选项,同步过后,还有如下5条语句运行出错,如下图:

05.png

在右键,选择“全部校验”,在运行这5条语句分别显示如下错误:


[Msg] Executing - CREATE UNIQUE INDEX `case_id` USING BTREE ON `jh_case_like`(`case_id`, `clientip`, `uid`)
[Msg] Failed - Error on Index case_id of Table jh_case_like - 1061 - Duplicate key name 'case_id'
[Err] Synchronization Failed
--------------------------------------------------

[Msg] Executing - CREATE INDEX `__INDEX` USING BTREE ON `jh_company_youhui_sign`(`company_id`, `youhui_id`, `uid`, `status`, `city_id`)
[Msg] Failed - Error on Index __INDEX of Table jh_company_youhui_sign - 1061 - Duplicate key name '__INDEX'
[Err] Synchronization Failed
--------------------------------------------------

[Msg] Executing - CREATE INDEX `orderby` USING BTREE ON `jh_mechanic`(`orderby`, `flushtime`)
[Msg] Failed - Error on Index orderby of Table jh_mechanic - 1061 - Duplicate key name 'orderby'
[Err] Synchronization Failed
--------------------------------------------------

[Msg] Executing - CREATE INDEX `orderby` USING BTREE ON `jh_shop`(`views`, `score`, `orderby`, `flushtime`)
[Msg] Failed - Error on Index orderby of Table jh_shop - 1061 - Duplicate key name 'orderby'
[Err] Synchronization Failed
--------------------------------------------------

[Msg] Executing - CREATE UNIQUE INDEX `tenders_id` USING BTREE ON `jh_tenders_look`(`tenders_id`, `uid`)
[Msg] Failed - Error on Index tenders_id of Table jh_tenders_look - 1061 - Duplicate key name 'tenders_id'
[Err] Synchronization Failed
--------------------------------------------------
解决方法:
分别打开目标数据库中的`jh_case_like` 、`jh_company_youhui_sign`、`jh_mechanic`、`jh_shop`、`jh_tenders_look`数据表,把数据表中索引栏位名,改为与源数据库中的栏位名一致即可,以下以`jh_tenders_look`数据表的栏位名为例,如图所示:

06.png


全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2025-1-4 09:46 , Processed in 0.173730 second(s), 25 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2025 Discuz! Team