Advertisement:

Author Topic: Database Crash and Resolution YaBBSE/SMF  (Read 30426 times)

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,152
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Database Crash and Resolution YaBBSE/SMF
« 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.

 

« Last Edit: September 16, 2004, 07:18:42 PM by Tony »
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Jeff Lewis

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,426
  • Gender: Male
Re:Database Crash and Resolution YaBBSE/SMF
« Reply #1 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 ;)
Jeff Lewis
Co-Founder, Lewis Media
Co-Founder, SMF
http://www.lewisonline.ca

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,152
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re:Database Crash and Resolution YaBBSE/SMF
« Reply #2 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.

:)

Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re:Database Crash and Resolution YaBBSE/SMF
« Reply #3 on: August 08, 2003, 08:56:14 PM »
I should note that SMF has an option to automatically repair broken tables.

-[Unknown]

Offline Acf

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,967
  • Gender: Male
  • 101101010112
Re:Database Crash and Resolution YaBBSE/SMF
« Reply #4 on: August 09, 2003, 03:40:58 PM »
many more features and still having a high speed.... now i realy wand a SMF board :)
Sigh...

Offline Meriadoc

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,263
  • Gender: Male
  • For the world is changing
    • Philip Renich: Websites
Re:Database Crash and Resolution YaBBSE/SMF
« Reply #5 on: August 11, 2003, 11:37:33 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