Repairing database tables (without phpMyAdmin)
#1
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
[Image: destroyerjf8.jpg]

Give us your feedback about MyBB in this thread and become listed on the MyBB website.
Reply
#2
Nice i like this it has helped and i am i think it will help other people a lot Smile
COOLIES
Reply
#3
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.


Attached Files
.php   repair.php (Size: 604 bytes / Downloads: 766)
My Site - My Forum - MyBB
[Image: madmike360.png]
Reply
#4
thanks for both of you, nice tutorial Smile
Official Arabic Translator.
Reply
#5
Why not make a option field where u can select which table to repair or repairing them all?
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - J.D Salinger
Reply
#6
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."
~Wolfey
Howlin' atcha!
Reply
#7
Did you modify 'threadsread' into 'sessions' ?
[Image: destroyerjf8.jpg]

Give us your feedback about MyBB in this thread and become listed on the MyBB website.
Reply
#8
Yeah, I did. It still wouldn't work. And on the other version of the script I still got the same error.
~Wolfey
Howlin' atcha!
Reply
#9
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
[Image: destroyerjf8.jpg]

Give us your feedback about MyBB in this thread and become listed on the MyBB website.
Reply
#10
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....
~Wolfey
Howlin' atcha!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)