0

This is a first for me... I'm importing into an database with no tables from a working backup.

Error
SQL query:


--
-- Dumping data for table `exp_accessories`
--

INSERT INTO `exp_accessories` (`accessory_id`, `class`, `member_groups`, `controllers`, `accessory_version`) VALUES
(1, 'Expressionengine_info_acc', '1|5', 'addons|addons_accessories|addons_extensions|addons_fieldtypes|addons_modules|addons_plugins|admin_content|admin_system|content|content_edit|content_files|content_files_modal|content_publish|design|homepage|members|myaccount|tools|tools_communicate|tools_data|tools_logs|tools_utilities', '1.0'),
(2, 'Developer_acc', '1|5', 'addons|addons_accessories|addons_extensions|addons_fieldtypes|addons_modules|addons_plugins|admin_content|admin_system|content|content_edit|content_files|content_files_modal|content_publish|design|homepage|members|myaccount|tools|tools_communicate|tools_data|tools_logs|tools_utilities', '1.7.1'),
(3, 'Devotee_acc', '1|5', 'addons|addons_accessories|addons_extensions|addons_fieldtypes|addons_modules|addons_plugins|admin_content|admin_system|content|content_edit|co[...]
MySQL said: Documentation

#1062 - Duplicate entry '1' for key 'PRIMARY' 

1 Answer 1

1

what does your create table code look like? this?

DROP TABLE IF EXISTS `exp_accessories`;    
CREATE TABLE `exp_accessories` (
      `accessory_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `class` varchar(75) NOT NULL DEFAULT '',
      `member_groups` varchar(50) NOT NULL DEFAULT 'all',
      `controllers` text,
      `accessory_version` varchar(12) NOT NULL,
      PRIMARY KEY (`accessory_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

does it include an auto increment value? run a query on the table and see if anything is in there? also try DESCRIBE exp_accessories

if you restarted the import at any time, the inserts may have already ran. see if your dump file also includes the DROP TABLE call. What DB admin tool are you using to run the import?

1
  • I'm using phpmyadmin and just running it through the tool. It runs fine through another hosting provider, so I think it's localhost issues that I'm having.
    – brunam
    Commented Jun 1, 2015 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.