在 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'
Run Code Online (Sandbox Code Playgroud)
我现在该怎么办。我已经使用了互联网上给出的增加时间的解决方案,但没有任何反应。我应该如何解决这个错误。
我的数据库大小只有 3 MB。我在 ubuntu 12.04 中使用 xampp 1.8.3。
小智 5
您可以主要使用 LAMP(Linux Apache MySQL PHP)代替 XAMPP。使用 LAMP 您也可能会遇到这个问题。
在我的情况下(使用 Ubuntu 15.10),我已经使用位于 /etc/php5/apache2/php.ini
但我仍然面临这个问题。然后使用config.default.php文件解决了问题
,您可以在其中找到如下这一行:
$cfg['ExecTimeLimit'] = 300;
Run Code Online (Sandbox Code Playgroud)
使它成为
$cfg['ExecTimeLimit'] = 0;
注意:您可以config.default.php通过此命令通过终端(Ctrl+Alt+T)定位文件,locate config.default.php可能的路径是/usr/share/phpmyadmin/libraries/config.default.php
希望这可以帮助。:-)
小智 4
放下它,然后在 phpmyadmin config.inc.php 中,您可以将超时从 300 秒增加到无穷大
添加这一行
$cfg['ExecTimeLimit'] = 0;
Run Code Online (Sandbox Code Playgroud)
和:
php> php.ini
Run Code Online (Sandbox Code Playgroud)
寻找:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
Run Code Online (Sandbox Code Playgroud)
改成:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 300
max_input_time = 540
memory_limit = 1000M
Run Code Online (Sandbox Code Playgroud)
小智 0
1发生这种情况是因为您在要插入的表ID中定义列的现有值PRIMARY KEY(主键的值是唯一值)。
尝试将列 ID 设置为AUTO_INCREMENT
我希望这能解决您的问题,我注意到您解决了 XAMPP 安装问题,请关闭此开放问题在 ubuntu 软件中心找不到 Xampp
| 归档时间: |
|
| 查看次数: |
34563 次 |
| 最近记录: |