MyBB Community Forums

Full Version: Repairing database tables (without phpMyAdmin)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

Whenever you get a MySQL error message saying that a specific table is marked as crashed and it needs repairing and you can't - or don't know how to - use PhpMyAdmin we came up with the following solution:

Download this copy of repair.php and upload it to your forums directory and call it via your browser.

Example: http://www.mydomain.com/forums/repair.php

You should get a message saying "Done" if the table is repaired correctly.


Note: by default this file repairs the mybb_threadsread table. If you want to repair another table, just open up repair.php

and find

// Change this to the table you want to repair
$table = TABLE_PREFIX."threadsread";

and modify "threadsread" into another table name.


Have fun,
destroyer
Nice i like this it has helped and i am i think it will help other people a lot Smile
I made an improved version of the script!

Steps:
  1. Upload the attached repair.php to your MyBB Root
  2. Open the file in your web browser (http://www.example.com/repair.php)
  3. Enter the table you want to repair (including prefix) into the box and press Submit Query.

N.B: While reasonable security measures have been used to ensure that a security breach is not possible, it could be used to inject data into your database. Delete after use for maximum security.
thanks for both of you, nice tutorial Smile
Why not make a option field where u can select which table to repair or repairing them all?
This isn't working. When I call repair.php into my browser, I get the exact same error message-- only the title says "MyBB Table Repair." I tried with both versions of the script. The crashing table is "mybb_sessions."
Did you modify 'threadsread' into 'sessions' ?
Yeah, I did. It still wouldn't work. And on the other version of the script I still got the same error.
Weird, it still works for me though.

Since Chris developed the original I think he'll have to take a closer look on it Big Grin
XP lol I hope it won't take too long to get his attention. Maybe an upgrade will do the trick? I think I'm still on version 1.2.12. lol I don't want to take too long cause in the meantime (obviously) nobody's able to access the forum....
Pages: 1 2