【发布时间】:2014-02-18 08:04:04
【问题描述】:
在 mysql 中导入数据库时出现此错误,当我重新提交相同的文件时出现此错误
Error
SQL query:
-- -- Dumping data for table `adminnotification_inbox` -- INSERT INTO `adminnotification_inbox` (`notification_id`, `severity`, `date_added`, `title`, `description`, `url`, `is_read`, `is_remove`) VALUES (1, 4, '2008-07-25 05:24:17', 'Magento 1.1 Production Version Now Available', 'We are thrilled to announce the availability of the production release of Magento 1.1. Read more about the release in the Magento Blog.', 'http://www.magentocommerce.com/blog/comments/magento-11-is-here-1/', 0, 0), (2, 4, '2008-08-02 05:29:53', 'Updated iPhone Theme is now available', 'Updated iPhone theme for Magento 1.1 is now available on Magento Connect and for upgrade through your Magento Connect Manager.', 'http://www.magentocommerce.com/blog/comments/updated-iphone-theme-for-magento-11-is-now-available/', 0, 0), (3, 3, '2008-08-02 05:40:04', 'Magento version 1.1.2 is now available', 'Magento version 1.1.2 is now available for download and upgrade.', 'http://www.magentocommerce.com/blog/comments/mag[...]
MySQL said: Documentation
#1062 - Duplicate entry '1' for key 'PRIMARY'
我现在该怎么办。我已经使用了互联网上提供的增加时间的解决方案,但没有任何反应。我应该如何解决这个错误。
我的数据库大小只有 3 MB。我在 ubuntu 12.04 中使用 xampp 1.8.3。
【问题讨论】:
-
notification_id字段似乎是主键,这意味着它不能具有相同的值。检查数据库中该字段是否已经有值1,或者它是否在您的.sql文件中重复。 -
我检查了 .sql 文件中的字段,那里只有一个
notification_id条目。我不明白是什么问题。