Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Tony Reid on August 08, 2003, 04:45:34 PM

Title: Database Crash and Resolution YaBBSE/SMF
Post by: Tony Reid on August 08, 2003, 04:45:34 PM
Hi Guys,

Tonight I had the fright of my YaBBSE MySQL db crashing.

I thought I would describe how I solved the problem - as it will be usefull not only for YaBBSE but also for SMF when it is released.




This is what happend.....

At the bottom of my index page was a big error message saying that my 'TOPICS.MYI' was corrupt.

To resolve this I imediately logged onto my site using Putty - my SSH software.

For those that dont have putty - they can get it here :
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Once logged on via putty, I went to my root folder.

cd /home/username

I then typed the following command to repair the DB
mysqlcheck --databases USERNAME_yabbse -uUSERNAME -p --auto-repair

That command will then asked  for my password. Its the one that matches your username. It can be your main SSH username/password or the one for your DB

After running the command, it reported the errors and repaired them!

At this time, I decided to do an imediate backup by typing this....

mysqldump -uUSERNAME -p username_yabbse | gzip >yabbse080803.gz

My next move was to log into the YaBBSE admin Center and run a repair from there! the reason behind this is that YaBB SE's repair can also recover messages and at the same time create a Salvage board and put the lost/orphand messages in it ready to be moved to there proper original locations.

That went fine

After this, I noticed the board was a little slow - so I ran the optimize script from within the YaBBSE admin center.

I then took another backup of the DB and FTP'd to my desktop.

Situation fixed within 5  minutes!




I hope that the above doesnt happen to anyone- but if it does you now know what to do!

I am not sure if running using the SE repair script first would have done the same thing - but in a situation like this I felt more comfortable using SSH and going directly into MySQL.



Title: Re:Database Crash and Resolution YaBBSE/SMF
Post by: Jeff Lewis on August 08, 2003, 04:47:52 PM
Odd, we got a call at the Lewis Media offices from a client who had the same table lock up.

Just went into phpmyadmin and did:

REPAIR TABLE topics;

Worked like a charm ;)
Title: Re:Database Crash and Resolution YaBBSE/SMF
Post by: Tony Reid on August 08, 2003, 04:50:28 PM
I tried that before, it was around the time that Cpanel 6 was corrupting tables with the automatic rollout of MySQL 4.

It didnt work for me then, although PHPmyadmin has since been upgraded - so maybe they fixed it.

:)

Title: Re:Database Crash and Resolution YaBBSE/SMF
Post by: [Unknown] on August 08, 2003, 08:56:14 PM
I should note that SMF has an option to automatically repair broken tables.

-[Unknown]
Title: Re:Database Crash and Resolution YaBBSE/SMF
Post by: Acf on August 09, 2003, 03:40:58 PM
many more features and still having a high speed.... now i realy wand a SMF board :)
Title: Re:Database Crash and Resolution YaBBSE/SMF
Post by: Meriadoc on August 11, 2003, 11:37:33 PM
Quote from: Coyote on August 08, 2003, 04:45:34 PM
My next move was to log into the YaBBSE admin Center and run a repair from there! the reason behind this is that YaBB SE's repair can also recover messages and at the same time create a Salvage board and put the lost/orphand messages in it ready to be moved to there proper original locations.

That went fine
/me feels useful :)
glad it went well! good info from all of you