When installing the software, make sure there is NOT a my.cnf dotfile in your home directory. That will affect the install scripts.

Ubuntu Repository

Available here.

gpg --keyserver  hkp:// --recv-keys 1C4CBDCDCD2EFD2A
gpg -a --export CD2EFD2A | sudo apt-key add -

Choose the repositories to add, based on your release.

Precise (12.04):

echo deb precise main >> /etc/apt/sources.list
echo deb-src precise main >> /etc/apt/sources.list

Install the database and tools:

aptitude update
aptitude -y remove mysql-common mysql-server-5.5 mysql-client-core-5.5 mysql-server-core-5.5
aptitude install percona-server-server percona-toolkit percona-xtrabackup percona-server-client

For the cluster:

aptitude install percona-xtradb-cluster-server-5.5 percona-toolkit percona-xtradb-cluster-test-5.5

Upgrade Notes

When upgrading the packages from the Ubuntu repository, do a couple of things to make sure the process goes smoothly:

  • Remove the .my.cnf for the root user
  • Remove the my.cnf file in /etc/mysql

Configuration Generator

When using the configuration generator, there are a few things you will need to change to make the configuration file compatible with Ubuntu server:

Change socket file to /var/run/mysqld/mysqld.sock, the same as in /etc/mysql/debian.cnf

The pid_file and the log_error values use the hostname as the prefix filename. So, for example, on, set the value for pid_file to /var/lib/mysql/ and for log_error, use /var/lib/mysql/foo.err

After that it should start fine. If this is a first install, and it's giving you issues, try removing the ib_log* files in /var/lib/mysql/ and see if that repairs it.