MyBB Community Forums

Full Version: Any way of Skipping a table from the database?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Im trying to upload a database backup .. But when it reaches a certain table it gives me an error therefore the full backup cannot be uploaded how can i skip this table from uploading?

I have no knowledge so a good explain through would be good.


here its the error that it gives


INSERT INTO mybb_google_seo( active, idtype, id, url )
VALUES (
'', '4', '35', 'List-of-free-anti-virus-and-spyware-protection-updated'
);

MySQL said: Documentation
#1062 - Duplicate entry '0-4-35' for key 2
Can you paste what the error is? It is probably an easy fix Smile Trust me, you don't want to skip a table as there is a 99% you forum won't work if you do that.
This is when i Import the database backup into phpmyadmin

SQL query:

INSERT INTO mybb_google_seo( active, idtype, id, url )
VALUES (
'', '4', '35', 'List-of-free-anti-virus-and-spyware-protection-updated'
);

MySQL said: Documentation
#1062 - Duplicate entry '0-4-35' for key 2

Then all the other tables don't upload because the table

mybb_google_seo gave an error while doing the backup.
Ah Ok thats a fairly easy fix, the easiest way to fix that would be to remove the lines:

INSERT INTO mybb_google_seo( active, idtype, id, url )
VALUES (
'', '4', '35', 'List-of-free-anti-virus-and-spyware-protection-updated'
);

From the restore Query. Then I would uninstall and reinstall the SEO plugin which that is related to and that should fix the fact that that record wasn't added.

Alternatively you could play around with the 0, 4 and 35 values until it works, I just don't know how the SEO plugin works so I don't know how the key structure works. Basically what it is saying though is that there are conflicts due to auto increment so there are two keys with the same value. Maybe post in the support thread for the SEO plugin if you don't want to take the risk of omitting that record.
Actually:

Just try changing it to this:

INSERT INTO mybb_google_seo( id, url )
VALUES ('35', 'List-of-free-anti-virus-and-spyware-protection-updated'
);

I think the first two fields should be auto increment or have default values if it works how I think it does... If not try my other solution.
(2009-08-23, 11:48 AM)TimB. Wrote: [ -> ]Ah Ok thats a fairly easy fix, the easiest way to fix that would be to remove the lines:

INSERT INTO mybb_google_seo( active, idtype, id, url )
VALUES (
'', '4', '35', 'List-of-free-anti-virus-and-spyware-protection-updated'
);

From the restore Query. Then I would uninstall and reinstall the SEO plugin which that is related to and that should fix the fact that that record wasn't added.


So i open my Databasebackup.sql

and change that to this

INSERT INTO mybb_google_seo( id, url )
VALUES ('35', 'List-of-free-anti-virus-and-spyware-protection-updated'
);
Alternatively you could play around with the 0, 4 and 35 values until it works, I just don't know how the SEO plugin works so I don't know how the key structure works. Basically what it is saying though is that there are conflicts due to auto increment so there are two keys with the same value. Maybe post in the support thread for the SEO plugin if you don't want to take the risk of omitting that record.
Actually:

Just try changing it to this:

INSERT INTO mybb_google_seo( id, url )
VALUES ('35', 'List-of-free-anti-virus-and-spyware-protection-updated'
);

I think the first two fields should be auto increment or have default values if it works how I think it does... If not try my other solution.

I can't get on my forum at all.. I deleted all the tables and trying to do a BACKUP but this is whats occurring
Tim , I'am willing to give you my database backup so you can fix it for me , I have no idea what to do .
Solved , My host provider helped me.
I closed your other thread on this, please don't make duplicates, I moved the other one for a reason.
(2009-08-23, 04:25 PM)MattRogowski Wrote: [ -> ]I closed your other thread on this, please don't make duplicates, I moved the other one for a reason.

Wow matt , I made this thread to ask how to Skip a DB table , not for someone to answer my question from the other thread .. I just posted it becuz he requested it.
It was about the same error, your other thread asked how to fix it, here you want to know how to skip it, it's about the exact same error, you could have asked how to skip it in the other thread.
Whatever man.
The attitudes around here are getting more and more ridiculous each and every day..
Pages: 1 2