LinuxMCE Forums
May 25, 2013, 04:47:29 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: MySQL failure. Any advice?  (Read 515 times)
darrenmason
Addicted
*
Posts: 529


View Profile
« on: October 27, 2011, 12:10:11 am »

Hi all,

My core power supply was having problems last night which meant that the core was instantly losing power and would need to be manually restarted. This happened a few times before I realised what was happening. I have now replaced the power supply and seems to be stable from that perspective - but it looks to have corrupted the databases.

mysqld will not start and when attempts are made to start it manually it fails after attempting to recover, blurts out a stack trace and advises to look at a couple of websites for more info. The websites just take me through attaching symbols to the stack trace etc which don't really help me at the moment.

Question is; can I somehow reinstall mysql without upsetting the rest of the system and having to do a reinstall? Anyone done anything like this?

regards
Darren
Logged
merkur2k
Addicted
*
Posts: 513


View Profile
« Reply #1 on: October 27, 2011, 05:52:25 am »

that seems pretty serious if its just segfaulting and dumping core. sure theres not any useful error messages in its logs before it does that?
might be some filesystem corruption too, it would be a good idea to boot it from a usb stick or livecd and do a full fsck.
if the db is toast though, thats very central to the system and really would require a reinstall.
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #2 on: October 27, 2011, 11:17:17 am »

another option is to
Code:
mysql -e "DROP DATABASE pluto_main"
apt-get install --reinstall pluto-system-database
mysql -e "DROP DATABASE pluto_media"
apt-get install --reinstall pluto-media-database

followed by a restore of your latest backup you did from within Web Admin. Follow that with a reboot, and you should be good to go again.
Logged

darrenmason
Addicted
*
Posts: 529


View Profile
« Reply #3 on: November 01, 2011, 02:43:01 am »

Thanks for the suggestions guys. Thought I would come back with an update....

fsck - was clean
posde - your suggestions rely on mysqld running which it isn't - but I may need those as the next step anyway.

The failure seems to be on applying the binlog when attempting to recover from a crash. The system was obviously left in this state from the power failing. It seemed to be stuck trying to apply the logs. Tried lots of different command line options to mysqld and running through debugger etc but nothing really worked.

At the last minute last night I thought I might just remove the binlog files so that it can't  apply them. This worked to an extent - in that it now allows mysqld to start. It has quite a lot of DB errors now with things being out of sync and missing which I figure is a side effect of removing the files. Went to bed after that as I couldn't keep my eyes open.

Will now try putting the binlog files back to see what happens. If it is still not happy then will follow posde suggestion and re-install the DB's.

Regards
Darren
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!