What got me up early Saturday and then up at 1am on Sunday? Server hardware failure…which led to some database corruption. I have never had to deal with database corruption, so I did not even know my problem was database corruption until after calling the helpful tech guys at Liquid Web. (I am not one to usually call tech support, but at 136am on a Sunday…I did not feel like spending time at mysql.com or google.com.)
I first noticed something on Saturday morning, but after restoring a database table from a backup, everything was golden. I told myself…it had to have been from some user error. Monday morning, after my Nagios server paged me, I noticed that jappler.com had several mysql
fetch_row () errors after the server came back up. I decided that this problem was not user error and something else was going on. As soon as I told the tech guy the error that I was seeing onjappler.com and other web sites I manage, he asked me if I had tried “repairing” the databases. I had not even thought about it (especially so early in the morning). Once he “repaired the databases”, everything was perfect.
This was a stressful lesson to learn, but I am always happy to learn new things. The lesson I learned was about database corruption. (All my tables are MyISAM)
- What is database corruption? Database corruption is damage to a database that then affects the integrity of the database structure and/or data.
- How/when is database corruption likely to occur?
- How do you repair your MySQL databases via the command line?
- How do you repair via CPANEL?
[tags]MySQL, database corruption, CPANEL, MyISAM[/tags]