News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Database Crash and Resolution YaBBSE/SMF

Started by Tony Reid, August 08, 2003, 04:45:34 PM

Previous topic - Next topic

Tony Reid

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.



Tony Reid

Jeff Lewis

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 ;)
Co-Founder of SMF

Tony Reid

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.

:)

Tony Reid

[Unknown]

I should note that SMF has an option to automatically repair broken tables.

-[Unknown]

Acf

many more features and still having a high speed.... now i realy wand a SMF board :)
Sigh...

Meriadoc

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
* Meriadoc feels useful :)
glad it went well! good info from all of you
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Advertisement: