News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Error #1062 - Duplicate entry

Started by Neverhurry, May 23, 2010, 03:43:18 PM

Previous topic - Next topic

Neverhurry

#1062 - Duplicate entry '?-985' for key 1

I found out the same problem in http://docs.simplemachines.org/index.php?topic=490.0
, Jesse the one who asked the question was suggested to ask in the community, has the question been answered somewhere? today, I had the same problem when importing a backuped sql file to a new database.

thanks.
I am using SMF 2.0.1, curve themes.

Allusion

smf_log_search_subjects?

I would drop the search index in SMF (afterwards also make sure to empty (not drop) the smf_log_search_* tables from the database) and run maintenance operations before exporting from the old database, and rebuild the search index after importing into the new database.

Neverhurry

Can you tell me how to drop the search index in SMF? thanks.
I am using SMF 2.0.1, curve themes.

Allusion

Go to Admin > Forum > Search > Search Method. Select "No index" and save. Then click the link to remove fulltext or custom index, whichever you have created.

Then select your forum database in phpMyAdmin and see if the smf_log_search_* tables contain any rows. If they do (and the forum is in maintenance mode, so no posting has been done during this time), select and empty (truncate) them. If you're not sure how to do this, just ask.

Alternatively, you can simply remove the data (not the structure) of those tables from the SQL file you got when you exported the old database.

Neverhurry

I am using SMF 2.0.1, curve themes.

IvanB

I'm having what looks like to be a similar problem.
ERROR 1062 (23000) at line 19888: Duplicate entry '7-4686' for key 1

line 19888 is: INSERT INTO `smf_log_search_subjects`

As indicated below, how do you put forum in maintenance mode? Am I on the right track to follow directions below?

Quote from: Allusion on May 23, 2010, 04:19:04 PM
Go to Admin > Forum > Search > Search Method. Select "No index" and save. Then click the link to remove fulltext or custom index, whichever you have created.

Then select your forum database in phpMyAdmin and see if the smf_log_search_* tables contain any rows. If they do (and the forum is in maintenance mode, so no posting has been done during this time), select and empty (truncate) them. If you're not sure how to do this, just ask.

Alternatively, you can simply remove the data (not the structure) of those tables from the SQL file you got when you exported the old database.

CapadY

To put the forum in maintenance mode:

Admin - Configuration - Server Settings

Then enable "Maintenance Mode".
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Adish - (F.L.A.M.E.R)

Is this resolved ? Feel free to hit the green button which says "Mark Topic Solved" just at the left bottom corner after the last post in the topic. :)

Advertisement: