Forum Dead - Corrupt tables , unable to repair or restore.... HELP!

Started by ModelBoatMayhem, March 14, 2012, 07:07:45 AM

Previous topic - Next topic

ziycon

No worries, this is a database command so you need to run it on your database, this can be run through phpmyadmin.

ModelBoatMayhem

OK, I'll do a backup and give it a go this evening.


If you don't hear from me again, I've been beaten up by 1,000 annoyed forum users that can't get back on their forum!!  ;)
That's my firm opinion.... but what do I know?!

ziycon

I would advise you try it on a backup first instead of trying on your live forum/database and then if all is ok, then do it to your live forum/database.

MrPhil

phpMyAdmin > SQL tab. Type in the SQL command (in this case, REPAIR...) and press GO.

ModelBoatMayhem

OK, created a backlup and ran:
REPAIR TABLE mbmf_messages USE_FRM

I got:
Backup1.mbmf_messages    repair    warning    Number of rows changed from 0 to 307935
Backup1.mbmf_messages    repair    status    OK

Is that what I should expect?
That's my firm opinion.... but what do I know?!

MrPhil

Well, that sounds better than 0 rows/not OK. You might as well CHECK (and REPAIR if necessary) all your tables, while you're in phpMyAdmin.

ziycon

Quote from: ModelBoatMayhem on April 02, 2012, 05:20:23 PM
OK, created a backlup and ran:
REPAIR TABLE mbmf_messages USE_FRM

I got:
Backup1.mbmf_messages    repair    warning    Number of rows changed from 0 to 307935
Backup1.mbmf_messages    repair    status    OK

Is that what I should expect?
The second line is the one you're looking for, as it says OK it means it was successful in running the command for that table.

ModelBoatMayhem

Right, finally run the fix but still getting 1,000s of errors  :(
That's my firm opinion.... but what do I know?!

ziycon

Quote from: ModelBoatMayhem on April 05, 2012, 07:24:20 PM
Right, finally run the fix but still getting 1,000s of errors  :(
Can you post a couple of the errors are they the same as before?

ModelBoatMayhem

Apply Filter: Only show the error messages of this member Guest
Today at 00:30:53
Apply Filter: Only show the error messages of this IP address 180.76.5.165    Apply Filter: Only show the error messages of this session e6b9ba1b4e1ce196506821fe2f44ae03
Apply Filter: Only show the error messages of this URL http://www.modelboatmayhem.co.uk/forum/index.php?topic=19393.msg188535
Apply Filter: Only show the errors with the same message 512: loadMemberContext(): member id 5234 not previously loaded by loadMemberData()
File: /home/mbmayhem/public_html/forum/Sources/Load.php
That's my firm opinion.... but what do I know?!

ModelBoatMayhem

Errors restarted 1 second after enabling 'Error reporting'.

Apply Filter: Only show the error messages of this member Guest
Today at 00:30:53
Apply Filter: Only show the error messages of this IP address 180.76.5.165    Apply Filter: Only show the error messages of this session e6b9ba1b4e1ce196506821fe2f44ae03
Apply Filter: Only show the error messages of this URL http://www.modelboatmayhem.co.uk/forum/index.php?topic=19393.msg188535
Apply Filter: Only show the errors with the same message 512: loadMemberContext(): member id 5234 not previously loaded by loadMemberData()
File: /home/mbmayhem/public_html/forum/Sources/Load.php
That's my firm opinion.... but what do I know?!

MrPhil

I suspect that the problem is that the database tables were not updated or restored in sync. My understanding is that an old members table is in use, with lots of members readded (under different IDs than before), and other tables assume different member IDs than are now provided. In other words, a right fine mess!

ModelBoatMayhem

OK, seems like I've reached stalemate...

Do I really annoy everyone that rejoined and loose all the new post or risk reinstating the old membership that I don't know if it will work... hmmmm......  :(

Did you mention there may be a way of manually connecting old memberships to new ones, where could i find information about that please?

That's my firm opinion.... but what do I know?!

MrPhil

Well, back up the entire database so that if things go terribly wrong, you can roll back to where you are now. I wouldn't think that people who rejoined would be terribly annoyed at being restored to their old settings, so long as they have their posts, etc. At worst, they'll have forgotten their old password and will need to ask for a new one (password restore). Completely new members will have to rejoin (sorry about that!). Perhaps you can make a list of all new members and manually add them (they'll have to request new passwords). As for lost posts, perhaps you can manually cut and paste in the new ones as new posts (I wouldn't try inserting them directly into the database), if you can match them up to existing (old) user names. Worst case, they'll be lost for good (although still available in the .sql backup). It will be a lot of manual labor to do that, so think carefully before proceeding.

Keep the forum in maintenance mode ($maintenance = 1) until you (admin) have looked around a bit and are certain that things are working smoothly, before letting in the other members. If you still get those errors (no improvement), restore the latest database backup that you just took, and we'll have to look around for some other cause.

As for "manually connecting old memberships to new ones", you're asking about reconciling a re-added member who has a different member ID than they used to have? I suppose that you could go directly into the database (phpMyAdmin) and UPDATE each message posted by NewID to be posted by OldID. That might be feasible, and would avoid losing recent posts. Don't forget to add in new-new members and update their messages and PM's in a similar manner (note that their messages may end up assigned to an old member, if they were assigned a member ID that was in the old database. You would have to look at the timestamp on a message to see if its associated member ID is an old one or a new one... very messy). Again, a lot of work -- is it worth it? Offhand, I don't know if there are additional items tied to member IDs beyond messages, topics, and PMs -- there may be.

It may just be easiest to restore the whole system to a recent, complete backup and let the chips fall where they may (and consider it a lesson learned to back up frequently and verify that your backup is good!).

Advertisement: