MyBB Community Forums

Full Version: #1062 - Duplicate entry '0' for key 'PRIMARY' SQL error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I exported my database and then I completely removed my forum,
I install forum again and when I want to import my last forum's data in database, unfortunately I see this error:

[Image: scr.gif]

******
Look! Before I export db, there was a problem in forum.
All managers in my forum and I (Administrator), have full access to Admin CP, I prevent access of them to Admin CP, but I didn't knew if I prevent them, myself can not access too : (
So I couldn't access to my forum's Admin CP anyway. So I exported my db and removed forum and again install and ... .

So what can I do?
tnx alot.
You should have to wait until any moderator move your previous thread: http://community.mybb.com/thread-91665.html

Looks like you haven't dropped the old DB.
(2011-04-05, 08:34 PM)Yaldaram Wrote: [ -> ]You should have to wait until any moderator move your previous thread: http://community.mybb.com/thread-91665.html

Oh, yes, that was my bad, That was wrong that I asked my question there. I tried to remove that, But I haven't access.
I'll just close the other thread since you already opened this one here. In future, just wait for staff to move it or PM one of the staff to do it.

The problem you have is you are installing the forum, then importing the old database using phpmyadmin. When you install a forum it inserts the default values, when you then import the old database on top of it it finds duplicate entries (default install + old database values)

In order to properly import it you'd have to use the merge system.

If you want to import it using phpmyadmin then you'll have to import it without installing the forum and manually edit the config file with the new values but that will lead you to the same problem you had before since its the same old database. You can edit the database to give admincp permission to te admins you edited though.

Thank u - G33K -