How To Install Percona Server 5.5 On Ubuntu 12.10

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Tue, 2013-01-08 18:57. :: Ubuntu | MySQL

How To Install Percona Server 5.5 On Ubuntu 12.10

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 12/21/2012

Percona Server is a drop-in replacement for MySQL. It offers more performance and scalability than the default MySQL server coming with your Linux distribution, while it uses the same init scripts and command line tools which makes it easy to use. This tutorial explains how to install Percona Server 5.5 on Ubuntu 12.10.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

If MySQL is already installed on your system, this is no problem - Percona Server will ssimply replace it, but keep data and also your MySQL configuration from /etc/mysql/my.cnf.

You can find a Percona Server benchmark here (in German): Benchmark: MySQL 5.5 vs. Percona Server 5.5

Because we will run all the steps from this tutorial with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing

sudo su

 

2 Configuring apt

Percona provides an apt repository for Debian and Ubuntu, which makes Percona Server very easy to install. First, import Percona's key:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A

gpg -a --export CD2EFD2A | apt-key add -

Next open /etc/apt/sources.list...

vi /etc/apt/sources.list

... and add the following two lines to it:

[...]
deb http://repo.percona.com/apt quantal main
deb-src http://repo.percona.com/apt quantal main

Next we need to pin Percona's package so that they don't get overwritten by upgrades from the Ubuntu repositories:

vi /etc/apt/preferences.d/00percona.pref

Package: *
Pin: release o=Percona Development Team
Pin-Priority: 1001

Then update the package database:

apt-get update

 

3 Installing Percona Server

Percona Server can now be installed as follows:

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

New password for the Percona Server "root" user: <-- yourrootsqlpassword
Repeat password for the Percona Server "root" user: <-- yourrootsqlpassword

That's it already. To check your MySQL version, log into the MySQL shell:

mysql -u root -p

root@Ubuntu-1210-quantal-64-minimal ~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38

Server version: 5.5.28-29.2 Percona Server (GPL), Release 29.2

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> <-- quit
Bye
root@Ubuntu-1210-quantal-64-minimal ~ #

As you see, we're using Percona Server now.

 

4 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by MaddinXx (registered user) on Thu, 2013-04-11 14:39.

Attention: I switched to Percona on the mailserver and stopped receiving mails. The amavis daemon/MySQL connector was not compatible with it - so postfix stopped doing it work.

 This encountered on a Squeeze system - if someone will have problems, make sure you check this by restarting amavis (this will print the error)

Submitted by BrightHammer (not registered) on Wed, 2013-01-23 22:51.

When percona is installed it doesn’t create a my.cnf file. Can show how to use the config wizard at http://tools.percona.com to create and use a my.cnf file?

Submitted by Dekenizer (registered user) on Wed, 2013-01-09 03:09.

Can it be "dropped in" in a ISPCONFIG 3 Environment ???

Or is that the next tutorial 

Submitted by falko (registered user) on Wed, 2013-01-09 08:47.

Of course - it is a drop-in replacement for MySQL, i.e., it is in fact a
MySQL server optimized for performance. It replaces the MySQL server
from your distribution's repositories, but leaving your data intact.