DTO vBulletin Product Support


Go Back   Drive Thru Online - Support | Drive Thru Online vBulletin Products > Best Practices > Site Management

Site Management User and vendor guidelines, moderation, and practices to minimize moderator and administrative hands-on.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-16-2009, 02:13 PM
Mark's Avatar
Mark Mark is offline
Administrator
 
Join Date: Nov 2008
Posts: 1,045
Default Repair damaged vBulletin database

If you go to your site some time and get a host of messages about tables being corrupt (or nothing displayed at all) you may have a vBulletin table damaged or corrupted. Often, even with big sites, this can occur for a number of reasons. Just as often you can fix these issues quickly without having to do a full database restore from a backup.

When you have a table corruption you will most likely have received a message, email, etc. from the server indicating that a particular table has been marked as corrupted or damaged. Note the name of the table in the message as you'll use it below.

The following is a list of steps to take if, because of the corruption, you can't log into AdminCP:

1) Log into the machine using a command line
2) cd (change directory) to your forums/includes directory
3) In a text editor open config.php (ie - "nano config.php)
4) Write down the following values that are set for the following:
$config['Database']['dbname']
$config['MasterServer']['username']
$config['MasterServer']['password']
5) Exit out of the editor
6) On the command line enter the following
mysqlcheck -u $username -p $dbname user
7) Hit return and enter $password when prompted

Note: replace the $username, $dbname, $password with the values you noted above

8) This will run a check on the table in question, user table in this case, and should come back with some type of indication that its broken.

9) Run the following command to attempt a repair
mysqlcheck -u $username -p $dbname --auto-repair user
This will attempt a repair

10) If this returns a message that it was able to repair, run the command again in step 6 to insure it you receive an "OK" response.

11) If OK then try to access your AdminCP

12) Once in Admincp go to Maintenance => Repair/Optimize Tables

13) Click Check All (top right) and then set Optimize Tables and Repair Tables to yes before clicking Continue

14) You should run this a couple of times until you see "OK" or "Table is already up to date listed next to each table

Last edited by Nathan; 03-18-2009 at 04:26 PM. Reason: Fix spelling error
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 06:31 AM.