7

I am getting this error while importing the database in mysql, and when I resubmit the same file than I am getting this error

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'

What should I do now. I already use the time increasing solutions given on the internet but nothing happen. How should I fix this error.

My database size is just only 3 MB. I am using xampp 1.8.3 in ubuntu 12.04.

4 Answers 4

7

Instead of XAMPP you may use LAMP(Linux Apache MySQL PHP) mostly. Using LAMP you may also face this problem.

In my case(using Ubuntu 15.10), I had configured/set post_max_size, upload_max_filesize, max_execution_time, max_input_time, memory_limit following my needs using php.ini file which is located at /etc/php5/apache2/php.ini

But still I was faced this proble. Then solved the problem using config.default.php file, where you can find out like this line below:

$cfg['ExecTimeLimit'] = 300;

Make it to

$cfg['ExecTimeLimit'] = 0;

Note: You can locate config.default.php file via your terminal(Ctrl+Alt+T) by this commandlocate config.default.php possible path is /usr/share/phpmyadmin/libraries/config.default.php

Hope this helps. :-)

4

let drop it, then in the phpmyadmin config.inc.php you can increase the time out from 300sec to infinity

add this line

$cfg['ExecTimeLimit'] = 0;

and:

php> php.ini

Find:

post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to:

post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 300
max_input_time = 540
memory_limit = 1000M
0

This occurs because there's already an existing value of 1 for the column ID in which you define it as PRIMARY KEY in the table you are inserting (values for the primary keys are unique values).

Try set the column ID as AUTO_INCREMENT

I hope this fixes your issue, i noticed you fixed your XAMPP installing issue, please close this open question Not finding Xampp in ubuntu software center

0

Go to xampp/phpMyAdmin/libraries/config.default.php find $cfg['ExecTimeLimit'] = 300; line no 695 and replace $cfg['ExecTimeLimit'] = 0;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .