我正在一个实时站点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

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

最佳答案

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

或者,如果您正在导入,则好像您正在尝试将数据导入到现有数据库中并且某些记录已经存在,则可以删除整个数据库并导入为空,或者在出现以下情况时遵循here显示的选项之一导入您的sql文件。请注意,如果您是进行导出的人,则可以选择“如果存在则删除”或“ INSERT IGNORE”来选择已包含此语句的选项。

关于php - magento SQLSTATE [23000]:违反完整性约束:1062键“PRIMARY”的重复条目“606078”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30610543/

10-09 08:51