Ubuntu and Upstart and MySQL

I upgraded some servers from Ubuntu 8.04 to 10.04 recently and ran into some problems accessing the mysql cli. Somewhere between those versions, the mysqld package for Debian/Ubuntu was converted to Upstart, a new method of handling the start/stop of tasks and daemons. Which is fine, as long as it works. But it didn’t.

The long & short of it is, if you’re having problems getting MySQL to start on Ubuntu 10.04 (and maybe 9.x), check the following:

  1. Look in /etc/init/mysql.conf for the line that reads:
    exec /usr/sbin/mysqld
    and change to:
    exec sudo -u mysql /usr/sbin/mysqld
  2. Look in /etc/mysql/my.cnf for the line that reads:
    skip-bdb
    and comment it out:
    #skip-bdb
  3. Start MySQL:
    sudo start mysql

I’m not strictly sure if skip-bdb needs to be commented out, and it’s a production server so I can’t go testing right now, but it’s probably good housekeeping nevertheless.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.