Wednesday, January 13, 2010

MySQL 5.1 configuration problem

Using Ubuntu is a thrill and a pain. I ran the update manager on our server today, and mysql-server was upgraded. And the website crashed, because mysql couldn't start. In hindsight, I think I'll test upgrades before I make them live. I didn't this time, however. So, in a desperate effort to get the site up again, I scoured the web for answers.

I had a similar problem before, wherein mysql told me it could find the /var/run/mysqld/mysqld.sock file, so I tried to fix it using the same methods I found last time on the Ubuntu Forums (See the post by *Select). It turns out that the problem, though it appeared similar, was different this time. I found the answer on this blog. When I upgraded, the mysql configuration file wasn't changed (/etc/mysql/my.cnf) to reflect the fact that mysql no longer supports BerkleyDB. I actually don't know what BerkleyDB is or does, but following the instructions on the blog above was enough to fix the problem for me. I hope this helps.