5:测试使用
root@debian45:~# pt-duplicate-key-checker --port=3306 --password=ops12300. --host=localhost --user=ops --socket=/tmp/mysql.sock
# A software update is available:
# ########################################################################
# forge.erp_agent_community
# ########################################################################
# agent_community_agent_id_index is a left-prefix of PRIMARY
# Key definitions:
# KEY `agent_community_agent_id_index` (`agent_id`),
# PRIMARY KEY (`agent_id`,`community_id`),
# Column types:
# `agent_id` int(10) unsigned not null
# `community_id` int(10) unsigned not null
# To remove this duplicate index, execute:
ALTER TABLE `forge`.`erp_agent_community` DROP INDEX `agent_community_agent_id_index`;
# ########################################################################
# forge.erp_agent_ridgepole
# ########################################################################
# agent_ridgepole_agent_id_index is a left-prefix of PRIMARY
# Key definitions:
# KEY `agent_ridgepole_agent_id_index` (`agent_id`),
# PRIMARY KEY (`agent_id`,`ridgepole_id`),
# Column types:
# `agent_id` int(10) unsigned not null
# `ridgepole_id` int(10) unsigned not null
# To remove this duplicate index, execute:
ALTER TABLE `forge`.`erp_agent_ridgepole` DROP INDEX `agent_ridgepole_agent_id_index`;
# ########################################################################
# forge.erp_city_head_office
# ########################################################################
# city_head_office_city_id_index is a left-prefix of PRIMARY
# Key definitions:
# KEY `city_head_office_city_id_index` (`city_id`),
# PRIMARY KEY (`city_id`,`head_office_id`),
# Column types:
# `city_id` int(10) unsigned not null
# `head_office_id` int(10) unsigned not null
# To remove this duplicate index, execute:
ALTER TABLE `forge`.`erp_city_head_office` DROP INDEX `city_head_office_city_id_index`;
# ########################################################################
# forge.erp_comments
# ########################################################################
# comments_trace_id_index is a left-prefix of acceptor_type
# Key definitions:
# KEY `comments_trace_id_index` (`trace_id`),
# KEY `acceptor_type` (`trace_id`,`acceptor_type`) USING BTREE
# Column types:
# `trace_id` int(11) not null
# `acceptor_type` varchar(255) collate utf8_unicode_ci not null
# To remove this duplicate index, execute:
ALTER TABLE `forge`.`erp_comments` DROP INDEX `comments_trace_id_index`;
# ########################################################################
# forge.erp_community_education
# ########################################################################
# community_education_community_id_index is a left-prefix of PRIMARY
# Key definitions:
# KEY `community_education_community_id_index` (`community_id`),
# PRIMARY KEY (`community_id`,`education_id`),
# Column types:
# `community_id` int(10) unsigned not null
# `education_id` int(10) unsigned not null
# To remove this duplicate index, execute:
ALTER TABLE `forge`.`erp_community_education` DROP INDEX `community_education_community_id_index`;