Skip to content
Archive of entries posted on February 2009

Default MySQL my.cnf for Ubuntu

Oi.
Tonight I realized how much of a mess my my.cnf file had become. Naturally, I failed to document all the changes I made… shame on me. So I decided to start over and restore the default. Ubuntu provides a my.cnf with the mysql-server-5.0 package, but I couldn’t find a method online of restoring it. Purging MySQL (no, I did not attempt such on this server) and reinstalling didn’t restore it, as for some unspeakable reason purging doesn’t remove /etc/mysql/my.cnf. Nor did dpkg-reconfigure have any bearing upon the file… even if deleted beforehand.

While purging, deleting, then reinstalling might be a solution, it’s not a good idea to attempt on a production server. Instead, simply run
apt-get source mysql-server-5.0
and you’ll find the default file at mysql-dfsg-5.0-5.0.xx/debian/additions/my.cnf

Awesome.