cancel
Showing results for 
Search instead for 
Did you mean: 

hai i'm new to magento please be guide me . . .

hai i'm new to magento please be guide me . . .

hai geeks while import my magento site localhost to live there are lot of problems starts. un-luckly i got solutions to all but only one is make tension. 

 

i import my database file through my phpmyadmin it shows this error , how to fix this 

 

 

Error in file: "/home/onlinema/public_html/app/code/core/Mage/Weee/sql/weee_setup/install-1.6.0.0.php" - SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table 'weee_tax', query was: CREATE TABLE `weee_tax` (
  `value_id` int NOT NULL auto_increment COMMENT 'Value Id' ,
  `website_id` smallint UNSIGNED NOT NULL default '0' COMMENT 'Website Id' ,
  `entity_id` int UNSIGNED NOT NULL default '0' COMMENT 'Entity Id' ,
  `country` varchar(2) NULL COMMENT 'Country' ,
  `value` decimal(12,4) NOT NULL default '0.0000' COMMENT 'Value' ,
  `state` varchar(255) NOT NULL default '*' COMMENT 'State' ,
  `attribute_id` smallint UNSIGNED NOT NULL COMMENT 'Attribute Id' ,
  `entity_type_id` smallint UNSIGNED NOT NULL COMMENT 'Entity Type Id' ,
  PRIMARY KEY (`value_id`),
  INDEX `IDX_WEEE_TAX_WEBSITE_ID` (`website_id`),
  INDEX `IDX_WEEE_TAX_ENTITY_ID` (`entity_id`),
  INDEX `IDX_WEEE_TAX_COUNTRY` (`country`),
  INDEX `IDX_WEEE_TAX_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `FK_WEEE_TAX_COUNTRY_DIRECTORY_COUNTRY_COUNTRY_ID` FOREIGN KEY (`country`) REFERENCES `directory_country` (`country_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_TAX_ENTITY_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_TAX_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_TAX_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE
) COMMENT='Weee Tax' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci

 

I hope u guys fix me . . .  thanks in advance

2 REPLIES

Re: hai i'm new to magento please be guide me . . .

As it indicates, the script is trying to create an index which already exists. What do you mean importing db file? this is not an error while importing DB, this is an error when install/upgrade.

If you are importing db dump file from a working magento site, you shouldn't see this error, and if so, chances are you have a broken db dump file.

Re: hai i'm new to magento please be guide me . . .

thank you for your reply. . .  and finally how to avoid this???