My site just crashed!!! I received the oh-so-helpful error “establishing a database connection” when I went to my site. Other sites on the server were fine. The site was working fine, and my config had not changed. The httpd error log showed nothing.
Then I found this in the MySQL logs (/var/log/mysqld.log)
[ERROR] /usr/libexec/mysqld: Table ‘./db_name/wp_options’ is marked as crashed and should be repaired
To fix I ran:
mysql -e “use db_name;REPAIR TABLE wp_options”
And we are back . . .