Fresh magento 1.9.2.4安装错误" customer_entity"表已存在于php 7中

时间:2016-12-26 07:16:47

标签: magento magento-1.9

我遇到了新鲜的magento 1.9.2.4安装。

抛出mysql错误" customer_entity"表已经存在。

这是我得到的错误

a:5:{i:0;s:1719:"Error in file: "C:\xampp\htdocs\webappmatemagmimport\app\code\core\Mage\Customer\sql\customer_setup\install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'customer_entity' already exists, query was: CREATE TABLE `customer_entity` (
  `entity_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Entity Id' ,
  `entity_type_id` smallint UNSIGNED NOT NULL default '0' COMMENT 'Entity Type Id' ,
  `attribute_set_id` smallint UNSIGNED NOT NULL default '0' COMMENT 'Attribute Set Id' ,
  `website_id` smallint UNSIGNED NULL COMMENT 'Website Id' ,
  `email` varchar(255) NULL COMMENT 'Email' ,
  `group_id` smallint UNSIGNED NOT NULL default '0' COMMENT 'Group Id' ,
  `increment_id` varchar(50) NULL COMMENT 'Increment Id' ,
  `store_id` smallint UNSIGNED NULL default '0' COMMENT 'Store Id' ,
  `created_at` timestamp NOT NULL default 0 COMMENT 'Created At' ,
  `updated_at` timestamp NOT NULL default 0 COMMENT 'Updated At' ,
  `is_active` smallint UNSIGNED NOT NULL default '1' COMMENT 'Is Active' ,
  PRIMARY KEY (`entity_id`),
  INDEX `IDX_CUSTOMER_ENTITY_STORE_ID` (`store_id`),
  INDEX `IDX_CUSTOMER_ENTITY_ENTITY_TYPE_ID` (`entity_type_id`),
  INDEX `IDX_CUSTOMER_ENTITY_EMAIL_WEBSITE_ID` (`email`, `website_id`),
  INDEX `IDX_CUSTOMER_ENTITY_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_CUSTOMER_ENTITY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_CUSTOMER_ENTITY_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE SET NULL ON UPDATE CASCADE
) COMMENT='Customer Entity' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci";i:1;s:1052:"#0 C:\xampp\htdocs\webappmatemagmimport\app\code\core\Mage\Core\Model\Resource\Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')
#1 C:\xampp\htdocs\webappmatemagmimport\app\code\core\Mage\Core\Model\Resource\Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.2.0.4')
#2 C:\xampp\htdocs\webappmatemagmimport\app\code\core\Mage\Core\Model\Resource\Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.2.0.4')
#3 C:\xampp\htdocs\webappmatemagmimport\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 C:\xampp\htdocs\webappmatemagmimport\app\code\core\Mage\Core\Model\App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 C:\xampp\htdocs\webappmatemagmimport\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Model_App->_initModules()
#6 C:\xampp\htdocs\webappmatemagmimport\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#7 C:\xampp\htdocs\webappmatemagmimport\index.php(83): Mage::run('', 'store')
#8 {main}";s:3:"url";s:57:"/webappmatemagmimport/index.php/install/wizard/installDb/";s:11:"script_name";s:31:"/webappmatemagmimport/index.php";s:4:"skin";s:7:"default";}

2 个答案:

答案 0 :(得分:0)

安装未正确完成。可能是它以前运行过并且被中断了,现在再次尝试运行时,你会遇到这样的错误。 不用担心,只需重命名运行脚本的php文件并继续安装。

答案 1 :(得分:0)

请在phpmyadmin中创建一个新数据库并删除local.xml并重新安装。 这样做会消除上述错误,以确保无忧安装。