June 14th, 2013 by Lincoln Baxter III

Drop-in migration from MySQL to Percona DB in two minutes

Percona DB is a drop-in replacement for the MySQL database, and as you’d hope for a business model based on providing out-of-box performance enhancements, the install is a complete breeze.

Install Percona on Debian/Ubuntu

First step, get the software:

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

Next, add the following entries to /etc/apt/sources.list, replacing “VERSION” with the name of your distribution:

deb http://repo.percona.com/apt VERSION main
deb-src http://repo.percona.com/apt VERSION main

Once this is done, you are ready to install, but since it’s probably a good idea to back up the database first, you should probably run a few more commands, for safety’s sake:

cp -Rf /var/lib/mysql /var/lib/mysql-old
cp /etc/my.cnf /etc/my.cnf-old

Now, we’re ready to run install the Percona packages, which will take care of automatically stopping, removing, and replacing any existing MySQL packages:

apt-get update
apt-get install percona-server-server-5.5 percona-server-client-5.5

Once this completes, you’ll want to verify that everything works as expected, and that your existing sites are running normally. If all goes well, you should notice a marked performance improvement in your database layer.

Install Percona on Red Hat, Fedora, and CentOS

First step, set up the software sources and verify that the repository configuration was successful:

rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
yum list | grep percona


// You should see the output similar to the following:
percona-release.x86_64                     0.0-1                       installed
...
Percona-Server-client-51.x86_64            5.1.47-rel11.1.51.rhel5     percona
Percona-Server-devel-51.x86_64             5.1.47-rel11.1.51.rhel5     percona
Percona-Server-server-51.x86_64            5.1.47-rel11.1.51.rhel5     percona
Percona-Server-shared-51.x86_64            5.1.47-rel11.1.51.rhel5     percona
Percona-Server-test-51.x86_64              5.1.47-rel11.1.51.rhel5     percona
...
xtrabackup.x86_64                          1.2-22.rhel5                percona

Once this is complete, you can now proceed to run the install, which will take care of automatically stopping, removing, and replacing any existing MySQL packages:

yum install Percona-Server-client-55 Percona-Server-server-55

Once this completes, you’ll want to verify that everything works as expected, and that your existing sites are running normally. If all goes well, you should notice a marked performance improvement in your database layer.

Additional Resources

For additional resources, check out the Percona documentation:

Posted in Linux

Leave a Comment




Please note: In order to submit code or special characters, wrap it in

[code lang="xml"][/code]
(for your language) - or your tags will be eaten.

Please note: Comment moderation is enabled and may delay your comment from appearing. There is no need to resubmit your comment.