magento SQLSTATE [23000]:完整性约束违规:1062重复条目' 606078'对于关键' PRIMARY

时间:2015-06-03 03:52:51

标签: php mysql magento

我正在网站http://spectnlens.com/上工作。 所以当我在本地主机上添加备份和解压缩文件时,我得到一个错误

There has been an error processing your request

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '606078' for key 'PRIMARY'

Trace:
#0 D:\xampp\htdocs\spect\lib\Varien\Db\Statement\Pdo\Mysql.php(110):     Zend_Db_Statement_Pdo->_execute(Array)
#1 D:\xampp\htdocs\spect\lib\Zend\Db\Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 D:\xampp\htdocs\spect\lib\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 D:\xampp\htdocs\spect\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#4 D:\xampp\htdocs\spect\lib\Varien\Db\Adapter\Pdo\Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#5 D:\xampp\htdocs\spect\lib\Zend\Db\Adapter\Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `lo...', Array)
#6 D:\xampp\htdocs\spect\app\code\core\Mage\Log\Model\Resource\Visitor.php(174): Zend_Db_Adapter_Abstract->insert('log_visitor_inf...', Array)
#7 D:\xampp\htdocs\spect\app\code\core\Mage\Log\Model\Resource\Visitor.php(108): Mage_Log_Model_Resource_Visitor->_saveVisitorInfo(Object(Mage_Log_Model_Visitor))
#8 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(463): Mage_Log_Model_Resource_Visitor->_afterSave(Object(Mage_Log_Model_Visitor))
#9 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Model\Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Log_Model_Visitor))
#10 D:\xampp\htdocs\spect\app\code\core\Mage\Log\Model\Visitor.php(167): Mage_Core_Model_Abstract->save()
#11 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Model\App.php(1338): Mage_Log_Model_Visitor->initByRequest(Object(Varien_Event_Observer))
#12 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Model\App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Log_Model_Visitor), 'initByRequest', Object(Varien_Event_Observer))
#13 D:\xampp\htdocs\spect\app\Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#14 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Controller\Varien\Action.php(528): Mage::dispatchEvent('controller_acti...', Array)
#15 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Controller\Front\Action.php(64): Mage_Core_Controller_Varien_Action->preDispatch()
#16 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Controller\Varien\Action.php(408): Mage_Core_Controller_Front_Action->preDispatch()
#17 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#18 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Controller\Varien\Front.php(176):    Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 D:\xampp\htdocs\spect\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 D:\xampp\htdocs\spect\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#21 D:\xampp\htdocs\spect\index.php(87): Mage::run('', 'store')
#22 {main}

错误日志记录编号:1097527033

我不知道发生了什么请帮我上传数据库,管理员工作正常。

1 个答案:

答案 0 :(得分:2)

首先尝试清除访问者日志 系统>配置>高级>系统>日志清理

或者如果您正在导入,看起来您正在尝试将数据导入现有数据库并且某些记录已经存在,您可以删除整个数据库并导入为空或遵循显示的选项之一{导入sql文件时{3}}。请注意,如果您是进行导出的人,则可以通过选择Drop if Exist或INSERT IGNORE

来选择已包含此语句。