Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

After a call from a customer to say that his website is down, I find that MySQL on our RackSpace Cloud Windows 2008 server was not running. I restarted MySQL but got the 'Access denied for user' error in the browser for all websites with MySQL database. When I look in MySql Server 5.5/data there are no folders other than mysql and performance_schema. It appears all the databases and data have been wiped. Does anyone know what might have happened and where the data has gone? To top that I just found this server is missing from our backup service.

ps appears to be after windows update at 4:01 this morning.

share|improve this question
    
Are there any relevant entries in your system and MySQL logs ? –  Iain Dec 14 '12 at 10:55
1  
"To top that I just found this server is missing from our backup service." Ouch. –  Tom O'Connor Dec 14 '12 at 11:05
    
the log file starts at 09:00 this morning when I started MySQL: InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... –  Iain Dec 14 '12 at 11:20
1  
This more than last ditch, but maybe you could try some data recovery software. You should power off the server ASAP, though, and access the disks offline. –  Dan Dec 14 '12 at 11:27
7  
Are you sure you're looking in the right directory? One may have changed the datadir in the configuration files without reloading MySQL and then this issue appears only after a restart of MySQL (possibly triggered by the system update). –  gertvdijk Dec 14 '12 at 11:54
show 1 more comment

1 Answer

  1. Contact Rackspace support.. That's what they're there for.
  2. Do everything they suggest.
  3. If that doesn't work, try Dan's suggestion of data recovery software.
  4. Use this as an opportunity for growth and learning.

Always ensure that all your servers are backed up, and test the backups regularly. There's no point in having a backup service if you never actually test that you can restore from it.

Oh, and turn off automatic updates. Only ever do them once you've tested the impact of the update, preferably on another identically configured server.

share|improve this answer
6  
+1 This really should be a canonical answer to questions asking how to restore data that hasn't been backed up. –  dunxd Dec 14 '12 at 11:54
2  
Thanks for help guys. gertvdijk put me on the right lines as found the data folders also under Program Files/MySQL as well as ProgramData/MySQL and restored from combination of data folders and ibdata1 file after reinstalling MySQL. As for the cause of the original problem that caused corruption and prevented MySQL from starting, the only clue I have is Windows update at 4am this morning but can't say it was that for sure. Has highlighted this server omitted from backup program and that would be the one with the problem would it not. –  Iain Dec 14 '12 at 19:01
1  
You should consider changing the server settings such that system updates are not installed automatically and unattended, unless you control by some other means exactly which updates are installed. What if an update changes the system's behavior in such a way as to break your customers' web sites? –  Michael Kjörling Dec 14 '12 at 19:29
4  
This is borderline flamebait but consider moving your mysql databases to a linux server. Their automatic security updates never restart the server and every major distro vendor will test compatibility of the updates with a core porgram like mysql (On the other hand neither Microsoft or Oracle will test mysql against a windows update). A backup cronjob is probably a little easier and more reliable than most windows backup software. –  Bryan Waters Dec 14 '12 at 21:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.