View Full Version : Power going out keeps corrupting my database
TylerBarnes
04-22-2015, 12:57 PM
I live in the older part of a college town and the power regularly goes out. I use WAMP which has Apache, PHP and MySQL neatly packed into a single program. However, whenever the power gets cut to my server it causes all the data in my database to I guess get out of sync and then become corrupt. Several weeks of work, player's characters, adjusted spawn rates are lost.
There has to be a better way of doing this. Any tips?
I thought Heidi SQL was backing up the data but I opened the .sql document and all it said was, "Not selected" when I could've sworn I had everything selected so that's going to be a fun fix.:-x
Akkadius
04-22-2015, 01:36 PM
I live in the older part of a college town and the power regularly goes out. I use WAMP which has Apache, PHP and MySQL neatly packed into a single program. However, whenever the power gets cut to my server it causes all the data in my database to I guess get out of sync and then become corrupt. Several weeks of work, player's characters, adjusted spawn rates are lost.
There has to be a better way of doing this. Any tips?
I thought Heidi SQL was backing up the data but I opened the .sql document and all it said was, "Not selected" when I could've sworn I had everything selected so that's going to be a fun fix.:-x
Open up CMD
mysqlcheck --auto-repair -u <username> -p <databasename>
It will go through and run through repairing your database tables automatically.
That'll be $1,000
Just kidding. :grin:
ghanja
04-22-2015, 02:23 PM
I'm guessing recommending an UPS would be too obvious.
http://www.amazon.com/CyberPower-CP425SLG-Standby-425VA-Compact/dp/B0030SL08A/ref=sr_1_6?ie=UTF8&qid=1429727322&sr=8-6&keywords=cyberpower+ups
Likely wouldn't keep your computer up for long, but with the power panel software and USB connection from the computer to the UPS, it could at least offer a means of a clean shutdown at around 25% battery life.
I've got four of these for the home rack and I haven't looked back. It's saved me a lot of heartache and ass pain.
http://www.amazon.com/CyberPower-CP1500PFCLCD-Sinewave-Compatible-Mini-Tower/dp/B00429N19W/ref=sr_1_3?ie=UTF8&qid=1429727415&sr=8-3&keywords=cyberpower+ups
(recommended for those with PFC power supplies in their desktops/home servers)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.