Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

We have a MySQL database that was restarted a few hours ago

When it restarted, the views were missing. The tables all seem intact, and a check on the mysql tables seems all good.

Any ideas what could have happened?

share|improve this question
    
So, SHOW FULL TABLES only shows base tables, but not views? –  Shlomi Noach Aug 16 '12 at 14:41
    
Please run SELECT COUNT(1) FROM information_schema.views; and SELECT COUNT(1) FROM information_schema.tables WHERE ENGINE IS NULL;. Do you get zeros ??? –  RolandoMySQLDBA Aug 16 '12 at 20:28
    
Sorry for the wild goose chase. Speaking of geese, it appears that some goose restored an old backup to our server sans views. –  Matt Tew Aug 27 '12 at 23:31
    
Thank goodness for binary logs, is all I can say. –  Matt Tew Aug 27 '12 at 23:31

1 Answer 1

A backup was restored to the server sans views. Simple really.

share|improve this answer
    
It would be nice to see an example of 1) how someone restored a backup "sans views", and 2) how to restore the database with views! –  Max Vernon Sep 5 '12 at 17:41
2  
We were using the retired MySQL administrator tool for backups (for transferring data to development machines, specifically). This tool includes the views as part of the script. However, when running the script for restore, it must have failed at restoring the views. –  Matt Tew Sep 6 '12 at 0:44
    
Thanks, Matt - you may want to update your answer with that info for future DBA.SE users with the same issue. –  Max Vernon Sep 6 '12 at 1:39

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.