First of all, I would recommend login as root so that you don’t have to sudo every time you hit the command and give the root password.
$ su -
Now you should be logged in as root. Mine now is
First of all lets remove everything that is related to MySQL from the machine.
apt-get remove mysql* apt-get purge mysql* apt-get autoremeve
Step 2: Adding the key
Now lets add the key that is provided by Percona, we have to add this to be allowed to install from Percona server.
apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
Step 3: Adding the repository
Lets add the Percona repository in the sources list in the machine/Ubuntu.
Add the following two lines in the source list:
deb http://repo.percona.com/apt saucy main deb-src http://repo.percona.com/apt saucy main
Step 4: Apt-Pinning the packages
In some cases you might need to “pin” the selected packages to avoid the upgrades from the distribution repositories. You’ll need to make a new file /etc/apt/preferences.d/00percona.pref and add the following lines in it:
Add the following line:
Package: * Pin: release o=Percona Development Team Pin-Priority: 1001
Step 5: Update
Step 6: Install Percona Server and Client
$ apt-get install percona-server-server-5.6 percona-server-client-5.6
Step 7: Install dependencies
If there are any dependencies left, then lets install them
$ apt-get install -f
Step 8: Testing
To make sure if Percona Server is installed in your machine with MySQL simply try:
$ mysql -u root -p
And it showed me :
root@rajug:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 5.6.15-63.0 Percona Server (GPL), Release 63.0 Copyright (c) 2009-2013 Percona LLC and/or its affiliates Copyright (c) 2000, 2013, 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>
That means I have now Percona Server !