News:

Wondering if this will always be free?  See why free is better.

Main Menu

smf_messages database corrupted... need help

Started by societyofrobots, January 14, 2017, 01:06:46 PM

Previous topic - Next topic

societyofrobots

The smf_messages table got corrupted (no idea why). The normal automatic repair function in myPhpAdmin was unable to fix it.

So I:
1) created a new database (with a different db name of course)
2) uploaded my db backup to it
3) exported just the smf_messages table
4) used Empty command to clean the corrupted table (I couldn't import otherwise)
5) imported just the smf_messages table from the backup

But now my forum is empty of all posts. It's as if it's ignoring the table, but everything else is there.

How do I fix this?

(I really need to fix this ASAP)

societyofrobots

Ok, ran "recount all saved counts and statistics" which seems to have fixed it.

Now appears my backup is missing a LOT of data... either it's also corrupted or I'm still doing something wrong....

Will update as I make progress.

societyofrobots

I'm stuck. I am trying to import my backup using phpMyAdmin.

The backup is an 81mb .gz file and seems to take forever to upload in phpMyAdmin, and then just stops uploading.

Only about half the forum posts get into the table (or my backups are all corrupted, but doubt that as the file size looks correct).

Perhaps a php timeout error? How can I approach fixing this?

vbgamer45

The best bet is restore from a backup.
Ask your host if they backups as well.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

Do you have a database backup/restore feature in your host control panel?  If not, you can ask your host to import the backup.  On some hosts, phpmyadmin will timeout with no error when importing an 80gb db.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

societyofrobots

1)
Ok, the first problem was HostGator doesn't allow greater than 50mb file uploads so it was truncating my upload without an error message. They changed it to 512mb limit for me but apparently it's a issue with their VPS that still requires the 50mb limit. So you have to ask them to do the whole upload into phpMyAdmin for you.

This allowed me to finally upload my full backup and extract the backup of the corrupted tables. As only two tables were corrupted, I only wanted to overwrite just those two - allowing me to keep all the other data like new users and such.

2)
Unfortunately, I still couldn't repair the forum. The two corrupted tables were labeled "in use" by phpMyAdmin, and gives me the error "Can't create new tempfile: /....." when I try to repair. Dropping the tables and re-adding didn't fix them.

So I googled the error and found this:
ashishkale999.wordpress.com/2013/02/16/mysql-error-cant-create-new-tempfile-tmd-file

I passed that info on to HostGator, they bashed it out for 2 hours, and walla it works.

I suppose I could have tried deleting the whole db and imported everything into a new one, but was hoping for an easier fix.

Hopefully this info helps the next guy who spends 11 hours straight on a Saturday trying to recover his forum lol.... sigh....

richardwbb

bigdump.php is able to import a MySQL dump file that is larger then what the host has set as a limit.
If my post in this topic looks ambiguous to you, then I'm with Murphy's law and General Stupidity. In other words, trial and error.

Advertisement: